OK, I'm trying to set this up so that when the character's animation sequence is being played, the character's animation flag is set to true, but when the animation is done playing, the flag switches back to false. While it does switch the flag on, I can't get it to switch back when the animation is done. This is the function I'm using:
Function Attack(Attacker.character,Attacked.character,Attack_Sequence,Range)
Attacker\anim_speed = 1
attacker\attacking = True
If attacker\model
If AnimSeq(attacker\model) <> attack_sequence
Animate attacker\model,3,attacker\anim_speed,attack_sequence,1
attacked\HP = attacked\HP + attacked\armor - attacker\strength
Else
If AnimTime(attacker\model) >= AnimLength(attacker\model) Then attacker\attacking = False
EndIf
EndIf
End Function
Can anyone tell me what to do to get this to work right? Thanks in advance.
Function Attack(Attacker.character,Attacked.character,Attack_Sequence,Range)
Attacker\anim_speed = 1
attacker\attacking = True
If attacker\model
If AnimSeq(attacker\model) <> attack_sequence
Animate attacker\model,3,attacker\anim_speed,attack_sequence,1
attacked\HP = attacked\HP + attacked\armor - attacker\strength
Else
If AnimTime(attacker\model) >= AnimLength(attacker\model) Then attacker\attacking = False
EndIf
EndIf
End Function
Can anyone tell me what to do to get this to work right? Thanks in advance.