0 votes

I manage to follow the tutorial on the documentation in regards to background loading. However I cant get my loading screen animation to play because it keeps on throwing an error saying its null. I tried to use things like getnode("/root/Sceneto_Access/AnimP").play("load") but it doesn't work and I get the null. The script runs fine without this but the grey background is shown with no animation of course. The thing is there is no indication of how the hierarchy is setup.

Is there a certain way I have to do this cause right now I have the script set in autoload and the loading screen is a separate scene.

Structure:
+Node
++ColorFrame(bg)
++AnimationPlayer

asked Mar 29, 2018 in Engine by zzxyr88 (35 points)

As a means of troubleshooting, try printing the names of the root node and its children before you try to make a reference to the animation player. This should give you some idea of the hierarchy. I suspect Godot may be changing the names of the nodes in your new scene because names from the previous scene are still "tied" to the previous scene's nodes (even if you've already freed them or queued them for freeing).

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.