Re animation

Blitz3D Forums/Blitz3D Beginners Area/Re animation

Ive got a character that walks when animated but when I use
Moveentity he moves but stops the walking motion. I think it is a loop problem. Heeeeeeeeeeeeeeeeelp!

Code please.

The code I use is

walk = extractAnimSeq(ninja,1,14)
while not keydown(1)
animate ninja,1,walk,10
moveentity ninja,0,0,.25
etc......
wend
I know it would work with the animate line outside the loop,but at some time in the game I need the model to do other things such as a back flip etc

Try this:
walk=ExtractAnimSeq(ninja,1,14) 
While Not KeyHit(1)

If Not Animating(ninja) Then
Animate ninja,1,walk,10
EndIf

MoveEntity ninja,0,0,.25
UpdateWorld
RenderWorld
Flip
Wend 


Try this instead:


walk=ExtractAnimSeq(ninja,1,14) 
While Not KeyHit(1)

if keydown(key_w)

MoveEntity ninja,0,0,.25

 If not animseq(ninja) = walk
  Animate ninja,1,walk,10
 EndIf
  endif

UpdateWorld
RenderWorld
Flip
Wend 



Thamks fellas, Saved again!