How do I figure out if the actor is on ground?

Valinor Games

  • Posts: 55
Hello, I'm sure that this question has been asked a lot of times, but I cannot seem to be able to find any topics about it.
How can I figure out if an actor is off the ground? I know I can have "when actor hits tiles... if bottom of actor 1 was hit: change boolean to true." but how do I figure out when it isn't hitting the ground?

noxtudios

  • Posts: 293
In an always event set ActorOnGround(Bool) = False

When touching the ActorOnGround = True, so when it is not touching, the bool is false

Hectate

  • *
  • Posts: 4643
If you look at the Run and Jump kit, I believe the way the "On Ground" check works is simply:

1. Always Set On Ground to False
2. Right way, If you're touching the ground, set it back to True.

That way the 2nd thing never happens when the player is off the ground and it stays false (until they touch the ground again).

Edit: Ninja posted!
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Valinor Games

  • Posts: 55
Thanks! that worked.