Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Object animation

Author
Message
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 30th May 2009 14:32
Hello, I have an animated object, I have made the movments with the animation, but my problem is the jumping, how do i do so that when I press spacekey and release the object play the jump animation even if the spacekey is released

My code in case


thanx for help
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 30th May 2009 14:59
you can when you press space make the jump variable one. and then make a special gosub called animation selector or something. then first, that gosub checks if the jump var = 1.if it is, it makes the animation the jump animation. if it isn;t, it just sets the animation to the current direction (forward, backward, left, right or passive). and if you're jumping and the jump var = 1, check every loop for collision with the ground. when it hits the ground, set the jump variable to 0 so the animation routine can change the animation to the current direction (forward, backward, left, right or passive) hope this helps

*ding ding*

Login to post a reply

Server time is: 2024-11-25 06:25:23
Your offset time is: 2024-11-25 06:25:23