HELP!!! my actor still doesnt jump correctly???

Hipster_Owl_StudiosHipster_Owl_Studios Member, PRO Posts: 214
edited November -1 in Working with GS (Mac)
ok so ive been trying and trying to get my actor jump but not by using the keyboard im making a jump botton the screen. and my actor jumps but he only jumps once then the jump botton doesnt become functional again??? now ive tried diffrent ways on doing ive gotten alot of help from the community and i appreciate it like no other! but i guess im having a bit more trouble then the average person lol... maybe you guys can help me out if i tell you my jumping logic

First i made a game attribute jump triger (integer)

in my jump button:i have

i create a rule ACTOR recieve TOUCH is PRESSED
--change attribute to game.jump to 0
then in for the otherwise part i dont know what to put I tired (this is were my problem is i think)
i tried putting change attribute to 1 but all that happens is that i can press the button more then once but the height my charecter is jumping at decreases??? unitll it hits the my ground actor... so i dont know what to put in my other wise?

in my charector actor i got

i put a rule attribute game.jump = 0
for timer for 0.1 sec
--accleertate 90 dir
and acleration 2000

--timer after 0.1 sec
change attribute game.jump to 0

then i have a gravity rule
--attribute game.jump = 1
--acclertate 270 etc

so thats what i have and my problem is that my jump button only works once??? if you guys can help me out maybe tell me how you would aproach it i would appreciate it thanks!

Comments

  • 2D-Sprite-Box2D-Sprite-Box Member Posts: 72
    I'd use a true/false for it and a timer, touch, pressed jump true, timer, after 1 sec change attribute jump false
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    This might help.

    I just added a jump to Joe's ducking demo for you.
    Im sure he would have a better solution but, this takes care of the basics.
    No double jumps or anything odd.

    http://gamesalad.com/game/play/64835
Sign In or Register to comment.