- Edited
Hello,
Not sure if this is bug or the way PLAY BACKWARD is implemented, so: (sorry i don't know how to set this to show code in window )
Example: Using Animation Sprite node.
this works OK
if Input.is_action_pressed("ui_down")
Sprite.play("Crouch")
if Input.is_action_pressed("ui_up")
Sprite.play("Crouch", true) #plays in reverse
this doesn't work, it just skips animation - no backward play
if Input.is_action_pressed("ui_down")
Sprite.play("Crouch")
# ...some code..
Sprite.play("Something_else") #change to some other animation
if Input.is_action_pressed("ui_up")
Sprite.play("Crouch", true) #plays in reverse
There is workaround if you set animation and frame of the animation before calling BACKWARD play like this:
if Input.is_action_pressed("ui_up")
Sprite.animation = "Crouch"
Sprite.frame = Sprite.frames.get_frame_count("Crouch")
Sprite.play("Crouch", true) #plays in reverse
To sum it all up, if you change animation to something else, GoDot doesn't know how to play backwards previous animation.
thanx
fixed the mistakes