Is there difference between these

is there a difference between at the beginning of the sceneandtrigger only once(not being a sub-event) I use both, and was wondering if there were any cons to using one of them


-thanks

When by themselves I believe it’s basically the same although using “at the beginning” makes your intention more clear. It’s mainly used for setup or initializations.

“Trigger Once” on the other side is usually paired with another condition to temporarily stop something from happening more than once. You still have the ability to unlock it by changing the other condition(s). While “at the beginning” will only ever happen once per scene.

When you pair “trigger once” with another condition it makes your reasoning more obvious. If you added “variable BridgeIsDestroyed is true” that would make it clear as to the motivation as to why it should only happen once. It also adds the ability to change it later if the condition(s) changed.

The more obvious you make your code, the easier it will be to debug it days and months later. You don’t need to look at the other events to find the context or reasoning. I think it’s good practice to always pair “trigger once” with another condition. Future you might thank you.

thanks a lot,

XD I hope so

1 Like

If you invert the first one, you get “on the second frame”. If you invert the second one… I think I never tried that. :sweat_smile:
Also, I’m not sure what happens if you pause and come back to a scene, maybe the trigger once will work once more?
Do some testing and let us know. :stuck_out_tongue:

1 Like

thanks to both of you./
so here are my findings:


\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

when inverted:
trigger only once: works as normal.
at the beginning of a scene: every frame after the beginning of a scene
scene resumed: every frame except when a scene is resumed
.

3 Likes