Hi guys,
+ Code Snippet' #################MAIN LOOP######################
DO
`ELAPSED TIME
`************************************************
`Get the amount of elspsed time since the last time check
elapsedTime = timer() - time
`Reset the time check
time = timer()
`UPDATE THE OAC
`************************************************
`SYNTAX: EnAn_oacUpdate oacID, elapsedTime
EnAn_oacUpdate oacID, elapsedTime
`If user presses the up key, and character is not already Walking, then set the character to walk
if ground = 1 and keystate(17) = 1 and MoveMode <> Move_WalkUp and keystate(31) = 0 and keystate(32) = 0 and keystate(30) = 0 and spacekey()=0
EnAn_AnimSetPlaySpeed WalkAnim, framerate
EnAn_oacAnimTransition oacID, spine, WalkAnim, 0, 0, -1, transTime, DoLoop, IncChild
MoveMode = Move_Walkup
endif
`WALKdown:
`If user presses the down key, and character is not already Walking, then set the character to walk
if ground = 1 and keystate(31) = 1 and MoveMode <> Move_WalkDown and keystate(17) = 0 and keystate(32) = 0 and keystate(30) = 0 and spacekey()=0
EnAn_AnimSetPlaySpeed WalkAnim, revframerate
EnAn_oacAnimTransition oacID, spine, WalkAnim, 0, 0, -1, transTime, DoLoop, IncChild
MoveMode = Move_WalkDown
endif
`WALKleft:
`If user presses the left key, and character is not already Strafing, then set the character to walk
if ground = 1 and keystate(30) = 1 and MoveMode <> Move_StrafeLeft and keystate(17) = 0 and keystate(31) = 0 and keystate(32) = 0 and spacekey()=0
EnAn_AnimSetPlaySpeed StrafeAnim, framerate
EnAn_oacAnimTransition oacID, spine, StrafeAnim, 0, 0, -1, transTime, DoLoop, IncChild
MoveMode = Move_StrafeLeft
endif
`WALKright:
`If user presses the right key, and character is not already Strafing, then set the character to walk
if ground = 1 and keystate(32) = 1 and MoveMode <> Move_StrafeRight and keystate(17) = 0 and keystate(31) = 0 and keystate(30) = 0 and spacekey()=0
EnAn_AnimSetPlaySpeed StrafeAnim, revframerate
EnAn_oacAnimTransition oacID, spine, StrafeAnim, 0, 0, -1, transTime, DoLoop, IncChild
MoveMode = Move_StrafeRight
endif
`STOPPING:
`If no movement keys are being pressed and character is not already stopped, then stop
if MoveMode <> Move_Stand and ground = 1 and keystate(17) = 0 and keystate(31) = 0 and keystate(32) = 0 and keystate(30) = 0 and spacekey()=0
EnAn_oacAnimTransition oacID, spine, StandAnim, 0, 0, -1, 400, DoLoop, IncChild
MoveMode = Move_Stand
endif
if MoveMode <> Move_Stand and ground = 1 and keystate(17) = 1 and keystate(31) = 1 and keystate(32) = 0 and keystate(30) = 0 and spacekey()=0
EnAn_oacAnimTransition oacID, spine, StandAnim, 0, 0, -1, 400, DoLoop, IncChild
MoveMode = Move_Stand
endif
if MoveMode <> Move_Stand and ground = 1 and keystate(17) = 0 and keystate(31) = 0 and keystate(32) = 1 and keystate(30) = 1 and spacekey()=0
EnAn_oacAnimTransition oacID, spine, StandAnim, 0, 0, -1, 400, DoLoop, IncChild
MoveMode = Move_Stand
endif
`JUMPING/FALLING and LANDANIM:
`If no movement keys are being pressed and character is not already stopped, then stop
if ground = 0
EnAn_AnimSetPlaySpeed JumpAnim, 30 :EnAn_oacAnimTransition oacID, spine, JumpAnim, 0, 0, -1, 60, NoLoop, IncChild
endif
if ground = 1 and jumptimer > 0
EnAn_AnimSetPlaySpeed LandAnim, 100
EnAn_oacAnimTransition oacID, spine, LandAnim, 0, 0, -1, 60, NoLoop, IncChild
MoveMode = Move_Jump
endif
handleExtraSpheres(numSpheres)
MovePlayer()
triggerzones()
sync
loop
Here is my main loop. I really want my werewolf to start walking again after he has gone through his jump and land animations, but he just stops after his land loop , which is this bit:
+ Code Snippet`JUMPING/FALLING and LANDANIM:
`If no movement keys are being pressed and character is not already stopped, then stop
if ground = 0
EnAn_AnimSetPlaySpeed JumpAnim, 30 :EnAn_oacAnimTransition oacID, spine, JumpAnim, 0, 0, -1, 60, NoLoop, IncChild
endif
if ground = 1 and jumptimer > 0
EnAn_AnimSetPlaySpeed LandAnim, 100
EnAn_oacAnimTransition oacID, spine, LandAnim, 0, 0, -1, 60, NoLoop, IncChild
MoveMode = Move_Jump
endif
handleExtraSpheres(numSpheres)
MovePlayer()
triggerzones()
sync
loop
Can anybody withexperience of enhanced animations help?
Thanks
Danny
p.s. In my next post I will attach the whole folder with everything in, as someone might find it more useful to load it all up and see the problem that way !
Thanks again for your time...
Dan