Script that listens independently from a scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Chain
:warning: Old Version Published before Godot 3 was released.

Greetings Godot Community!

I wanted to know if there is a way to have consistent listener (in this case for input) that runs independently from a scene. Kinda like an overlay.
Because I dont have a player instance or sth like that which could do it.

Thanks in advance!

:bust_in_silhouette: Reply From: 807

You should do an “autoload” singleton script. Write a script and find the “autoload” option in project config. This kind of script will be in the top of the scenetree, it will be independent of the scene (but it instantiate their own node if inherits object), and be unique.

That was it. Thank you :slight_smile:

Chain | 2017-08-23 10:07