Hi,
I was wondering, why is it that when you want to set up an animation to happen on a certain event, such as a key hit, you have to do something like this, taken from the markio example:
If KeyDown(30) ;forward
If p\anim_speed<=0
p\anim_speed=1.75
Animate p\model,1,p\anim_speed
EndIf
MoveEntity p\entity,0,0,1
Else If p\anim_speed ;stop animating
p\anim_speed=0
Animate p\model,0
EndIf
instead of just:
If KeyDown(30)
p\anim_speed = 1.75
Animate p\model,1,p\anim_speed
EndIf
or, with the animation speed already set:
If KeyDown(30)
animate p\model,1,p\anim_speed
EndIf
I've been having trouble setting up animations for characters in my game, NPC's especially, and I think it would help if I understood this better.
I was wondering, why is it that when you want to set up an animation to happen on a certain event, such as a key hit, you have to do something like this, taken from the markio example:
If KeyDown(30) ;forward
If p\anim_speed<=0
p\anim_speed=1.75
Animate p\model,1,p\anim_speed
EndIf
MoveEntity p\entity,0,0,1
Else If p\anim_speed ;stop animating
p\anim_speed=0
Animate p\model,0
EndIf
instead of just:
If KeyDown(30)
p\anim_speed = 1.75
Animate p\model,1,p\anim_speed
EndIf
or, with the animation speed already set:
If KeyDown(30)
animate p\model,1,p\anim_speed
EndIf
I've been having trouble setting up animations for characters in my game, NPC's especially, and I think it would help if I understood this better.