Moving Platforms HELP!!!
Hi Gamesalad Gang
Need some help. I am working on making a platformer template and I am having problems with my player jumping and landing on moving platforms and being able to freely move side to side just like in a mario game. I have been trying to solve this myself and searching on the GS forums for answers but have not found anything that works or I am just not getting it.
Below is what I have done so far.
In my "game attributes" I made two "real attributes" called "MovingPlatformX and MovingPlatformY"
In my Moving Platform Actor dragged over two "Constrain Attribute"
- game.MovingPlatformX to self.Position.X
- game.MovingPlatformY to self.Position.Y
Created a "Rule"
- Actor receives event - overlaps or collides - with - actor of type Player
- Constrain Attribute/ - game.MovingPlatformX to self.Position.X
Created a group "Rule" with in it..(Platform movement Rules)
- Change Attribute/ self.Motion.Linear Velocity.X to: 100
Created a "Rule"
- Attribute / self.Position.X > 500
- Change Attribute / self.Motion.Linear Velocity.X to: -100
Created a "Rule"
- Attribute / self.Position.X < 350
- Change Attribute / self.Motion.Linear Velocity.X to: 100
Thanks!!
R.
Need some help. I am working on making a platformer template and I am having problems with my player jumping and landing on moving platforms and being able to freely move side to side just like in a mario game. I have been trying to solve this myself and searching on the GS forums for answers but have not found anything that works or I am just not getting it.
Below is what I have done so far.
In my "game attributes" I made two "real attributes" called "MovingPlatformX and MovingPlatformY"
In my Moving Platform Actor dragged over two "Constrain Attribute"
- game.MovingPlatformX to self.Position.X
- game.MovingPlatformY to self.Position.Y
Created a "Rule"
- Actor receives event - overlaps or collides - with - actor of type Player
- Constrain Attribute/ - game.MovingPlatformX to self.Position.X
Created a group "Rule" with in it..(Platform movement Rules)
- Change Attribute/ self.Motion.Linear Velocity.X to: 100
Created a "Rule"
- Attribute / self.Position.X > 500
- Change Attribute / self.Motion.Linear Velocity.X to: -100
Created a "Rule"
- Attribute / self.Position.X < 350
- Change Attribute / self.Motion.Linear Velocity.X to: 100
Thanks!!
R.
Comments
Please I need some help with this.. I think I need to somehow constrain the players motion to the moving platform.. but not sure how to do this.
hope that helps