Hello folks, i have trouble with my code, when i crouch with my char he can walk forward or backward but then the crouching animation freeze on the first frame. The crouching animation get back to normal after one attack but it freeze when i walk forward while crouching, here my code :
After some test its seems the problem is in the first part of the code the walk forward crouch animation, however I've failed to find the culprit in the code, can you see what I've done wrong ?
Question
Risotto
Hello folks, i have trouble with my code, when i crouch with my char he can walk forward or backward but then the crouching animation freeze on the first frame. The crouching animation get back to normal after one attack but it freeze when i walk forward while crouching, here my code :
; Crouch Walk
;---------------------------------------------------------------------------
[Statedef 16]
type = C
physics = C
sprpriority = 0
[State 16, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)
[State 16, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 16 && Anim != 6
trigger2 = Anim = 6 && AnimTime = 0
value = 16
[State 16, End]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 17 && Anim != 6
trigger2 = Anim = 6 && AnimTime = 0
value = 17
[State 16, 3]
type = ChangeAnim
trigger1 = command != "holdfwd"
value = 11
[State 0, ChangeState]
type = ChangeState
trigger1 = command = "holdback"
value = 17
ctrl = 1
;---------------------------------------------------------------------------
; Crouch Walk Backwards
;---------------------------------------------------------------------------
[Statedef 17]
type = C
physics = C
sprpriority = 0
[State 17, 1]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)
[State 17, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 16 && Anim != 6
trigger2 = Anim = 6 && AnimTime = 0
value = 16
[State 17, End]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 17 && Anim != 6
trigger2 = Anim = 6 && AnimTime = 0
value = 17
[State 17, 3]
type = ChangeAnim
trigger1 = command != "holdback"
value = 11
[State 0, ChangeState]
type = ChangeState
trigger1 = command != "holdback"
value = 16
ctrl = 1
After some test its seems the problem is in the first part of the code the walk forward crouch animation, however I've failed to find the culprit in the code, can you see what I've done wrong ?
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now