Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JakeCarbine |
hello I am currently working on the end of my game of pong when a player is shown a label ‘Press R to restart’ here is my code:
func restart_stage():
get_tree().call_group('BallGroup','stop_ball')
$RestartLabel.visible = true
$RestartLabel/RestartAnimation.set_loop(true)
$RestartLabel/RestartAnimation.play("Fade")
Could you please clarify your question? If the animation is contained in RestartAnimation
then it should restart via your code.
If that isn’t working, try something like this:
$RestartLabel/RestartAnimation.get_animation("Fade").set_loop(true)
$RestartLabel/RestartAnimation.play("Fade")
Ertain | 2021-04-20 19:09
thank you this worked!!
JakeCarbine | 2021-04-21 09:54