exiting animation loop

Blitz3D Forums/Blitz3D Programming/exiting animation loop

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

update . everything works now apart from i can't work out how to disable running animation whilst jumping forward and running
I want to have a simple jump animation for running jump as distinct from the animation for standing jump.
here is the code so far
suggestions greatly appreciated

;walking backward ################################
If AnimSeq(p\model)<>1
Animate p\model,1,.7,1
EndIf
MoveEntity p\entity,0,0,.1;p\entity is the parent of p\model
EndIf
;EndIf

;walking backward ################################
If KeyDown(208)

If AnimSeq(p\model)<>1
Animate p\model,1,-.7,1,.5
EndIf
MoveEntity p\entity,0,0,-.1

EndIf

;idle #####################################################################

If Not KeyDown(200)
If Not KeyDown(203)
If Not KeyDown(205)

If Not KeyDown(208)
If Not KeyHit(184)
idleflag=True

EndIf
EndIf
EndIf
EndIf
EndIf

If idleflag=True
If AnimSeq(p\model)<>2
Animate p\model,1,.2,2,7

EndIf
EndIf

;idle ############################################################

;turning####################################################

If KeyDown(203)

If AnimSeq(p\model)<>4

Animate p\model,1,.05,4,5

EndIf


TurnEntity p\entity,0,2,0

EndIf

If KeyDown(205)

If AnimSeq(p\model)<>5

Animate p\model,1,.05,5,5
EndIf

TurnEntity p\entity,0,-2,0

EndIf


;jumping ############################################################

ty#=EntityY(p\entity);from castle demo
y_vel#=(ty-p\player_y)
p\player_y=ty

If KeyDown(184) And EntityCollided(p\entity,TYPE_SCENERY>1

Animate p\model,3,.5,6

y_vel=1

Else
y_vel=y_vel-.05 ;from castle demo
EndIf