ai_swag_myframe = 199 ai_swag_pressed = 0 ai_swag_mode = 1 function ai_swag_init(e) --ai_soldier_state{e} = "idle" CharacterControlLimbo(e) StopAnimation(e) end function ai_swag_main(e) RotateToPlayer(e) if ai_swag_mode==0 then -- we can browse the entity animation frames if g_Scancode==0 then ai_swag_pressed=0 end if ai_swag_pressed==0 then if ai_swag_myframe > 0 and (g_Scancode==12 or g_Scancode==28) then ai_swag_myframe=ai_swag_myframe-1 end if g_Scancode==13 or g_Scancode==14 then ai_swag_myframe=ai_swag_myframe+1 end if g_Scancode==12 or g_Scancode==13 then ai_swag_pressed = 1 end end SetAnimationFrame(e,ai_swag_myframe) end if ai_swag_mode==1 then SetAnimationFrame(191,208) LoopAnimation(e) ai_swag_mode = 2 end Prompt("Scancode="..g_Scancode.. "Frame=" .. ai_swag_myframe) end