how to make my charecter jump with a jump button???
Hipster_Owl_Studios
Member, PRO Posts: 214
I need to learn how to make my charecter jump with a jump button that i made on screen? ive tried it before and i used a game attriburte (integer) but when i did that my charecter only jumped once because my jump button was only functional once.. so can somone tell me another methoed to make my charecter jump using a jump button like for instance a boolean attribute thanks!!
Comments
http://gamesalad.com/wiki/how_tos:gsc_jump
Go ahead into the Scene Settings and make another layer so you can put
your HUD elements in there, call it Control Layer and uncheck scrollable.
(Place your other controls in there too like left and right movement)
(Btw: I tend to use touches instead of anything so you might have to change some stuff)
(Make sure you have gravity on also)
Okay what you'll need are:
Actors:
Your button actor
Your character
Platform
Others:
onGround (Boolean set to false)
jumpTrigger (Integer)
Okay now for your Button Actor
-If Actor is touched
Change Attribute jumpTrigger to 1
For the Character
- If jumpTrigger = 1 and onGround = true
Accelerate 90" (set whatever speed you want)
- If Actor collides or overlaps with Platform
Change Attribute onGround to true
That should about do it! Enjoy! xD