making my actor jump?
Hipster_Owl_Studios
Member, PRO Posts: 214
I am trying to make my actor jump with a button, ive tried ways to do it but im lost i dont know how to make my actor jump i know how to make him jump by pressing the space bar(well kinda he jumps but then floats off top of the screen) but im making an ipad game and i want a jump button can someone help me out as to how should i approch this?
Comments
Create a game attribute called jump. (integer)
Then create an actor called jump switch.
Add a rule {
When touch is pressed.
Change attribute _ game.jump to 1
}
Then in your actor that you want to jump add this rule {
when game.jump = 1
(timer) __For 0.1 seconds__
Accelerate ^2500
(timer) __after 0.1 seconds__
change attribute _ game.jump to 0
}
Under heading HOW TO'S, click link "Movement", then you'll find the link: "How do I make an actor jump?"
:-)
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
If you touch
Accelerate for 1.5 seconds
Turn "run to completion" off, and it'll let you jump higher depending on how long you hold down the button.
Try 100 then 200....
Add a rule into the actor that jumps, accelerate down 300.
Then make it collide with a floor. Then on the floor and the actors restitution 0.
Just download this... http://gamesalad.com/game/play/54538
Edit: Sorry guys I should have edited the last 2 posts.
Then make you actor that jumps collide with actor of type floor.
Its all in that link I posted.