Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Syl |
Greets!
Got a RighTextLabel modified in every tiles of my Tilemap, and cleared when exiting them, with that little line of code:
func _on_Area2D_body_exited(_body):
get_node("/root/Node2D/Stage/Player/Text").clear()
It works fine, except when trying to change scene, then i got a crach, attempting to call function ‘clear’ in base ‘null instance’ on null instance…
And it’s an essential line of code, as much as my changing of scene… If anyone thinks of a workaround…
I’d need something like:
if change_scene = false:
But i don’t know how to write that in GDscript.