Another animation question

Blitz3D Forums/Blitz3D Beginners Area/Another animation question

Aussie(Posted 2010) [#1]
Gday all,
Haven't been here in a while.
I have been playing around with a simple 3d platformer & have run into problems with animation. I have searched through other code & just can't seem to get it to work.

I have 2 animation sequences for now, one for standing & one for walking. Eventualy there will be more.

So far i can get the walking sequence to start but it wont stop, or i have had the standing sequence going but the walking animation then starts when i release the key to start it.

I am using the Ninja model from Psionic's site
http://www.psionic3d.co.uk/?page_id=25


What am i missing here?
Cheers :)



vivaigiochi(Posted 2010) [#2]
you must use correct algorithm via the use of animseq instruction.
it's animseq that say you what anim is currently in use. you can define some "state" that indicate to you the state of your entity in conjuction with animseq. and remember if the entity is correctly positioned into editor (i speak about coordinates) it is not necessary make position entity at the begin of your routine like PositionEntity world,0,0,0.


Ross C(Posted 2010) [#3]
Use somthing like:


If keydown(200) then (KEY UP)
If AnyAnimationPlaying <> walk then
Playanimation walk
End if
Else (NO KEY PRESSED ESSENTIALLY)
IF AnyAnimationPlaying = True then
PlayAnimation Standing
End if
End If

Basically, you want o check if any keys are pressed. If they are, check to see if the walk animation is playing on the character. If not, then play the animation. THEN, if your If statement picks up no keys being pressed, use the ELSE by itself once you've checked all other relevant keys. You can now play the stop animation as no keys are being pressed, but there is an animation playing.

That should sort you out.


Aussie(Posted 2010) [#4]
Cheers guys got it going. will more than likely have a few more questions soon. :)