How do I use variables to switch to another scene when the game is opened twice?

hello, i am curious on how to switch to another scene when the game is opened twice with variables! i hope it is possible

As in you have 2 instances of the game running? You can’t do it with variables, but you can using Storage (here’s an example app on using storage)

may you send a example of the code?

actually what i was meaning when the game was opened, as in you open it from the direct file

No need to, it’s in the link I provided (the Edit this game in GDevelop button)

I don’t understand what you mean by this.

ok so say you open the game from the exe file, and it detects the game has been opened twice. it would change to another scene, i am wondering how i could do that

Not easily. Like I said, you can use storage to track whether the game is open, but the problem then is what happens if the game is shut down. You can’t update storage, so the next time you run the game (making it the first instance) the storage variable is still set, and it’ll start on the other scene.

So the short answer that I cannot see how you can achieve it using GDevelop events.

ok, if i asked a question that can’t be solved then ima be confused because yall can answer almost anything

But we can’t give answer to things the GDevelop game engine is not capable of doing. Sorry :man_shrugging:

anyways, how would i create a storage?

just curious lolllll

but how do i make storages

It’s in the link I sent at the start of the thread.

ok, thanks bro! im sure it will help