Help: Detecting the Top of a Platform

TebrocTebroc Erie PaMember, PRO Posts: 10
edited August 2012 in Working with GS (Mac)
Hello all.

I have been trying to come up with a good way to have the player jump up through a platform and land on top of it. I have looked at and implemented the technique from TshirtBooth here http://gshelper.com/how-to-jump-through-a-platform-and-land-on-top-with-gamesalad/ (Very helpful by the way!) However, the challenge in my case is that 'player' is not walking and jumping. Instead the Player flies around the screen and only when making contact with the ground does he walk. What I would like is to be able to fly player through the platform and then only when the 'accelerator' is released, do i want the top Y axis of the platform to catch the player on it's way down, and then change an attribute to make the character walk. TshirtBooth's implementation works well except that his formula looks at the top Y axis and greater (again, great for a Mario style game) but bad for when my player is flying above that platform in that zone above it. If I try to use 'equals', it rarely works as the players Y position and and platforms Y position are real numbers that measure out to the thousandths and would rarely detect as equal. I would even be happy if I could determine the top of an actor so I could toggle 'fly' and 'walk' and skip the idea of flying up through it.

Any ideas would be greatly appreciated. Thanks!
Sign In or Register to comment.