How to not have an actor be able to jump in mid air
OK well i need to know how to make my actor not be able to jump in mid air. I have integers so that when my actor that jumps is grounded he can not jump it looks like this.
when actor collides with actor of type Platform set game jump to 0 (no jumping)
when the actor finishes a jump and lands on the platform he can still jump even after the platform ends eg; in mid air
Thanks to anyone who helps![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
when actor collides with actor of type Platform set game jump to 0 (no jumping)
when the actor finishes a jump and lands on the platform he can still jump even after the platform ends eg; in mid air
Thanks to anyone who helps
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Answers
first you dont need any attributes for this all you need is a rule and gravity
(single jump)
rule=when actor collides with platform and when touch is pressed
then in the rule have: change attribute of self.position y to self.position y +100
(The 100 is just the height of the jump,change it to anything you want higher the number the higher actor jumps)
To create gravity for an individual actor all you have to do is put an acceleration behaviour into the actor and set it to 180 and speed to how strong you want the gravity.
Note: Without gravity the actor will just hover in mid air and do nothing
If you still need help send me a email and i will try my best to help you with your app.
Bilzo99@gmail.com
Hope i helped
Bilal
or, when jump set attribute to jumping, then if attribute is jumping, cant jump :P