Scene switching problem

So, i’m making a pseudo survival game, with kinda generated terrain. once the scene begins, everything works as intended, but when i switch to the death screen and to main scene, it teleports me to shadow realm or sum shi*. but fr it just restarts the scene, but the terrain, lighting, size of the objects, position of the player, everything just does not work. i tried using “once resumed” instead of “at the beggining of the scene” but still the scripts did not work. pls help, i kinda worked a lot on this game and its my first big problem. i will attach the file down below.
for information, you can walk by pressing a and d, can die by touching wolves and shift makes u faster.
How do I...?

Hello gtasaw!
I would recommend creating a Boolean variable “scene starting” and set it to true “at the beginning of the scene” when that Boolean is set to true, run normal scene starting behaviors. Then when the player dies and the scene restarts, also set that Boolean to false, then true again to restart the functions.

  • Obee

bf8f62f0-7d79-450a-ba50-7adb277dc4ae here save file

hi, i will try it, thanks in advance :slight_smile:

Anytime! If you have any issues reply back and I’ll see if I can help.

  • Obee

Are you pausing and later resuming the main scene, or stopping each scene and then starting the other one?

Can you post screen shots of the events from both scenes that open up the other scene?

hey, i tried binding all events that are associated with terrain genneration and spawining things (aka. all that had at the beggining of a scene condition) to an key, but still it does not fully work. when first starting game and generating terrain via button press, everything works fine, but after i restart the scene and try again, some elements are not generating.

i attached images on how it loads up first time, and how it loads secound time, same button press, same event, same everything.


here is how it should look

hi, in post i wrote about switching to a diffrient scene, but in my code for testing reasons i switch to the same scene to reset it. here is the code:

That can’t be all of the events. Can you include screen shots of the events that are kicked off at the beginning of the scene? And are you using any global variables to set up the scene?

And to confirm, does the problem still occur when you switch to the same scene?