How to send variables to other scenes?

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

Hello everyone.
I’m looking for a way to send variables to different scenes.
What would be the best way of doing so?

:bust_in_silhouette: Reply From: Alex Pires

Using Take a look at singletons :

Then, you can access variables in any scene, for example:

var highscore = global.hiscore 

What i want to do is scores. For example if enemy has 0 hp then he emits signal or something, that the hud scene receives and adds to the score. And don’t think singletons would work for something for this. If they would could you send me a link where I could find out how to do it?

xxxNAMExxx | 2019-03-03 16:58

Nvm, just did it. Thank you it really helped.

xxxNAMExxx | 2019-03-03 17:49