Animation Player does not reset after scene change, but only from one scene?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SnapCracklins

Okay so I can’t figure this out.
I have an animation player that brings up a “stage select” menu where options and icons expand on load. Works great. Logic is fine.

I also have an “exit” screen you can go and leave the game from. However, when loading this scene and then returning to the stage select from it, my animations don’t run and stop halfway through one window! Makes no sense because it does not do it from the other scenes at all. Reset on save is also checked in the editor and i have even tried updating that setting in the code at ready.

Is this a 3.5 bug perhaps? I am using the exact same scene change function for all of the scenes.

:bust_in_silhouette: Reply From: Inces

Are You sure your other scene didn’t leave expanded Control container in a way ? :wink:
And AnimationPlayer wouldn’t be able to completely expand SelectMenu because this Control node takes half of its space :wink:

It actually happened to me :slight_smile:

I had the Control node expanded, fixed it, but that did not solve my problem.
I ended up fixing it by setting up a reset animation, putting the buttons into a group and checking the scale of that group with a for statement. It can be a bit janky, but it’s better than the window not expanding at all.

func _on_AnimationPlayer_animation_finished(_anim_name):
     var _icons = get_tree().get_nodes_in_group('icons')

     for i in _icons:
	    if i.scale.x < 2:

SnapCracklins | 2022-09-11 22:38

If it works it is fine :slight_smile:
Control nodes are huge hassle in Godot. I am sure You will find out what is blocking it later. actual size, max size and scale all interact in hardly predictable way, there is always some jank in manipulating these.

Inces | 2022-09-12 14:49