For god sake, is it possible to add a true “EXIT SCENE” instead to a ““PAUSE” AND GO TO” for scenes?.. or better have both…for a fresh clean reset pls…?
…it’s so bad to counter any (and i mean any) “at the beginning of scene” events just to get a clean scene as the first launch
I’m not sure I understand the ask here. Can you provide more context?
The “change the scene” event action does exactly what you are asking. (As far as I can tell?). Using this action, the scene is no longer kept in memory. At the beginning of scene events occur again when using the “change the scene” action to switch back to a scene.
Edit: you can even make it drop any other scenes that may have been paused with the toggle, removing them from memory. I have just tested this on the web version and confirmed that paused scenes will restart from scratch(reusing beginning of scene events) after using this action with this toggled to yes.
It is also the default one used in all of the tutorials, “pause and start a new scene” and “stop and go back to previous scene” are exclusively meant to be used in conjunction with one another, for when you want to keep the scene’s state in memory, and therefore it is not the beginning of the scene again (you can just add an OR condition to your beginning of scene events and add the “scene has just resumed” condition to have those events occur there, as well).
You should not be using either of these two event actions if you want a clean break between scenes, even when returning to a scene you may have used earlier.
Thx for reply Silver.
maybe better explain with a video…
Look at here first —>87.38 MB file on MEGA
I’ve setd up a simple stamina event at the beginning of the scene.
First of all when i reset…You’ll notice that my text is already present (1st issue) becouse imo i have not set to hide if scene swap (ofc i have not…bcs why i have to, i want a reset).
Also for reasons my stamina bar is messed up a resum becouse (imo) something went wron at the beginning of the scene event.
It’s not that i don’t know how to fix it…
but do i really have to clean every single…fk…g event or object at swap scene just to have a clean restart?
Why not to have a full project reset…action like close and restart .? cos imo pause and go to is not economic.
P.S: I don’t think any tutorial can cover me at the moment
Your video doesn’t show your events to switch scenes, so I can’t really give full guidance.
Also just to make sure it is clear, please note “at the beginning of the scene” does not mean “before all other events”, it just means the event just triggers once the first frame of the scene. All other events above it will still happen first if their conditions are true.
And thaz exaclty my problem…
I don’t wnat it to happen…i want a clean restart as i started gd the first time
I really prefer to not write crap-lines just to counter my scene starts events…
thaz why my request
Your above statement still doesn’t make sense on what you are asking.
Again, all scene variables, object placement, etc, will be reset as if the scene had never started, when using the “change the scene” event action, even if changing back to the same scene you are on.
There is no “crap lines” needed to begin the scene if new.
The only thing that won’t reset is global variables, because they are global and don’t care about what scene you are on. That is by design as the global variables don’t have a “reset” state, just their current state.
than why my stamina trunc condition is messed up at resume?
It’s justa trunc(global.variable (p1stamina))
as u noticed it is not working even if its a all frame action
Becouse i don’t have a scene resume…becouse i don’t want a scene resume.
i don’t use resum becouse i use load global var jar for that.
I just have this
Also, as mentioned, all global variables will never “reset” as there is no “reset” state. If you want default values for your global variables then you have to define defaults separately.
I know it.
I have no events who change my stamina if the player don’t level up or pick something…my global var should stay unchanged
i don’t need to reset it at the game start.
But even so its not the problem… i know how to reset those vars…but still
i think a reboot action should be implemented … like a first start action
Global variables “start” state are not kept in memory (by design of what global variables are supposed to do), a restart option wouldn’t change anything different than the change the scene event.
If you must use global variables for things that are going to potentially reset, you should just have another set of variables (in a structure) that has the defaults so you can just set the “current game state” global variables back to those defaults as needed with a single action (by setting the game state structure global variable to the default global variable structure)
I’m not sure what you are showing me in the above screenshot. The scene editor global variables doesn’t have anything to do with global variables once the game is running.
Those preset values no longer exist once the game starts, everything after that about globals are what is kept in memory, any changes to the globals are the new global variable value.
Your events in your video show you updating the global variables. Therefore those “default globals” are no longer the defaults when you start over.
As far as the original feature request, what you are asking doesn’t actually have anything to do with scenes or changing scenes, and would require the engine to keep additional data (the original value of all global variables) in memory for all games regardless if they need it or not, so it is unlikely to ever be implemented.
I’m remote currently, but I’ll do a quick mockup when I get home to show you a potential path forward for what you are trying to do.