Moving Platforms HELP!!!

Rye73Rye73 Member Posts: 2
edited February 2012 in Working with GS (Mac)
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.

Comments

  • Rye73Rye73 Member Posts: 2
    *BUMP*
    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.
  • ashtmjashtmj Member, PRO Posts: 405
    What I do is constrain the platform and the player to the same speed if they are colliding, then if you want him to be able to move you could constrain him to the speed of the platform+his walking speed, or - if he is moving left.

    hope that helps :)
  • Rye73Rye73 Member Posts: 2
    Thanks for the quick reply.. I'll give this a try.
Sign In or Register to comment.