Re animation

Blitz3D Forums/Blitz3D Beginners Area/Re animation

Gord(Posted 2004) [#1]
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!


jhocking(Posted 2004) [#2]
Code please.


Gord(Posted 2004) [#3]
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


electronin(Posted 2004) [#4]
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 



(tu) sinu(Posted 2004) [#5]
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 




Gord(Posted 2004) [#6]
Thamks fellas, Saved again!