TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
How do I figure out if the actor is on ground?
Pages:
1
How do I figure out if the actor is on ground?
Valinor Games
Posts: 55
May 13, 2016, 09:51:11 am
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
May 13, 2016, 10:48:02 am
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
May 13, 2016, 10:48:55 am
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
May 13, 2016, 12:27:20 pm
Thanks! that worked.
Pages:
1