Attention | Topic was automatically imported from the old Question2Answer platform. | |
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?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
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?
Reply From: | Alex Pires |
Using global.gd. 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