Run and jump

app-etiteapp-etite Member Posts: 139
edited November -1 in Miscellaneous
Hey guys,

My game has a scrolling background with my character running on spot and a jump when the screen is touched.

My only problem is having the animation change properly when jump is pressed. I have when self.linear velocity y > 0.5 then play the jump animation.. It works 50/50. But Sometimes the main run cycle is flicking in the background.

Very frustrating because im so so close but don't know what else to do.

Please help

-app-etite studios

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    whatever rule or attribute you have to activate the jump, just throw a animation in there and have restore to original image. Thats all you should have to do.

    And to stop the multiple animations playing at one time, have a attribute for jump. In your regular animations have when jump=0 animate run or whatever. Then when the jump happens change jump to one then change it back to 0 after howmany seconds you want. So the run animation will only take place when your not jumping.
  • DreamLabDreamLab Member Posts: 2,127
    I like how he put TSB as a tag
  • monofonusmonofonus Member Posts: 10
    This post was really helpful to me. Thanks John!
Sign In or Register to comment.