Platform problem
iDeveloperz
Member Posts: 1,169
Hi guys I am trying to make a game like doodle jump. But you cant go from underneath the platforms as they bounce you back down. =/
Comments
You need to keep track of the main player Actor's Y, and you have to add a Rule to the platform like this:
Create a global real game attribute called PlayerY
In the Player Actor, add a Constrain Attribute:
Constrain Attribute: game.PlayerY to self.Position.Y
In the Platform Actor, wrap a Collide Behavior with this Rule:
Rule
When game.PlayerY > (self.Position.Y + (self.Height / 2))
Collide with actors of type Player
Do NOT put a Collide behavior in the Player, and make sure the one in the platform is wrapped like that.
That should do the trick.
Hope this helps!
Joe
http://gamesalad.com/game/play/28690