Message

Hey,

Is it possible to send a message to an object in a different scene without having that scene on background or overlay?

thanks.

no, a scene needs to be active before you can send a message to it. And would be the point? If you can’t see what’s happening in another scene then what’s the point?

What are you planning to do with this?

Well, I can figure some other way out. but I have a shop in which you have money.
In the other scene, the money is earned so I need a way to send money to the shop once an enemy is killed.
But i’ll try something with a background scene.

Why not just have an overlay empty scene and store all your properties there, then when you go to the shop scene, the shop scene sends a message to the empty scene where you store all the properties and the empty scene distributes the properties to the shop scene

OR

You can use Global Dict :slight_smile:

Good Luck!

Why not just have an overlay empty scene and store all your properties there…

OK, while the sentence following is a bit confusing (CRC), you should stay away from that method. An overlay scene depends on the main one, when changing scenes, the overlay one will be deleted along with the main one. If the shop scene is overlay itself, pause should not be used on the main one either.
However, if you use the main scene as empty/controller scene, then, it will work as long as the other scenes run on overlay or background.
Global Dict is indeed the “normal” way to do it!

Um, it doesn’t really work that way, that’s how my Faith game was made and whenever there was a change of scene, the overlay would not get deleted. This is because the overlay scene is on it’s own and not attached to the main one in anyway, unless you literally put in a script to delete the main own along with the overlay. No scene, is the main scene, all scenes are either overlays or backgrounds, if you add an overlay to your level scene, your level scene is the background and the overlay you just added is the overlay.

Also, for the shop, I think he meant it’s a level in the game, so it would be a “main” scene if you can call it that. :stuck_out_tongue:

You are right though, it’s not really the best way to go, but sometimes it is. Like if you want to make a fade in/out, between scenes, the best way to do it is with an overlay scene :slight_smile:

The easiest and most organized way is with GlobalDict, so I suggest you learn python for that :wink: