![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | GameVisitor |
Hi all,
I followed the pause tutorial and sample app and managed to create a popup pause menu easily. However I am unable to play an animation upon “unpausing” my game, using the following code :
func _on_btnunpause_pressed():
$"Popup/lbl-anim".show()
$Popup/AnimationPlayer.play("anim_unpause")
$"Popup".hide()
get_tree().set_pause(false)
pass # replace with function body
The result is having the game immediately un-paused (as if animation code is non-existent).
Thx
What is the Pause mode of the $Popup/AnimationPlayer
node?
SASUPERNOVA | 2018-07-29 13:00
The pause mode is process (so is the mode of the label that displays a text for 2 seconds)
GameVisitor | 2018-07-29 15:00
It is possible that $"Popup".hide()
gets called before your animation gets finished, which could cause your issue. Have you connected a method to the animation_finished slot of $Popup/AnimationPlayer
?
SASUPERNOVA | 2018-07-29 22:13