Graphics3D 800,600
SetBuffer BackBuffer() player=LoadAnimMesh("player.b3d")
idle=ExtractAnimSeq(player,34,61)
run=ExtractAnimSeq(player,62,92)
run_back=ExtractAnim Seq(player,93,123)
PositionEntity player ,0,0,-25
Global head=FindChild(player,"Bip01 Head")
cam=CreateCamera®
PositionEntity cam ,0,0,-50
Global headyaw,headpitch
Global state
Const transpose = 10
While Not KeyHit(1)
If KeyDown(203) Then headyaw=headyaw+1:If headyaw > 80 Then headyaw = 80
If KeyDown(205) Then headyaw=headyaw-1: If headyaw < -80 Then headyaw = -80
If KeyDown(200) Then headpitch=headpitch+1: If headpitch > 20 Then headpitch= 20
If KeyDown(208) Then headpitch=headpitch-1 : If headpitch < -25 Then headpitch= -25
If KeyDown(17) And latch_key_Q = False Then Animate player,1,0.5,run,transpose:latch_key_Q = True:state=3
If Not KeyDown(17)Then latch_key_Q = False
If KeyDown(31) And latch_key_W = False Then Animate player,1,0.5,run_back,transpose:latch_key_W = True:state=1
If Not KeyDown(31) Then latch_key_W = False
If state=4 Then Animate player,1,0.5,idle,5
If Not KeyDown (17) Then
If state=3 Animate player,1,0.5,idle,5
End If
If Not KeyDown (31) Then
If state=1 Animate player,1,0.5,idle,5
End If
RenderWorld
UpdateWorld
Text 200,200, "state="+state
RotateEntity head,headpitch,0,headyaw
Flip
Wend
End
;------------------------------------------------------------------------------------------------
не могу зделать так штобы когда нажымаю w штобы шол вперёд а кагда атпускаю штобы была анимации idle