When I load my "mysave" save, events seem to re-trigger... How do I make sure this wont happen? I tried using the persist function for all my objects but it did not help. Might it be that events like "trigger once" and such is the problem? I just want to return to a state simply put. I use the constructs very own "save" and "load" action.
Something similar was reported here construct.net/en/forum/construct-3/how-do-i-8/trigger-once-state-not-saved-174049
Seems that if you load a game it will run through trigger once events again. It doesn't remember that they were once triggered before the save occurred.
I see, thanks for the reply!
Seems there is no real solution other than rework the code, in some places im not sure how to do it since ”on created” also seems to trigger again. Is there a better way to save a game? What about json?
I don't think trigger events are affected, it seems to be single trigger once conditions which to be honest I think are bad practice anyway, there are better conditions to use than a trigger once on its own.
Ah okay, so using trigger once below other conditions in the event is fine? It's only having a single trigger once function that ruins it? If so it should not be so much to change.
From what I can see, yes. Construct team has yet to weigh in on whether it's as designed. It makes a little sense because when you load a game and you are in a different layout it is like changing layout. It is better to combine trigger once with something else. If you want to trigger it once on start of layout then you have the condition there for start of layout (this will not trigger when the game is loaded).
Develop games in your browser. Powerful, performant & highly capable.
Thanks! Although "on created" and "on start of layout" seems to trigger when loading...