Open tobbi opened 1 month ago
This is a great option to have, especially for infinitely looping scripts that are only meant to trigger once, such as a loop that randomises the time between lightning strikes, however, I think there remains the need for scripts that are triggered every time on sector entry (such as my STAGE project, that needs to check for changes made in other sectors when a sector is entered). I have a few possible solutions in mind.
Basically you want an option that you can check to specify whether it's run every time. I think I need to also reset the flag when the sector is reset.
Discussion question: Should I keep the default of "run every time" for backward compatibility reasons, but make an option of "run only once".
Can I get some input on this?
@Narre @tylerandari13 @Vankata453
Yeah, I believe a script to run only on sector initialization should be a separate option.
I agree, with both options available, the default should be the old behaviour to avoid needlessly breaking older levels.
This is ready for review. I haven't tested the actual behaviour but to quote "I, Robot": "My logic is undeniable". https://www.youtube.com/watch?v=LH-G8c3TUac
Every time you load a sector it replaces all the instances with new instances. Is this also gone with this PR or is that untouched?
Every time you load a sector it replaces all the instances with new instances. Is this also gone with this PR or is that untouched?
What do you mean by "instances" in this case?
Every time you load a sector it replaces all the instances with new instances. Is this also gone with this PR or is that untouched?
What do you mean by "instances" in this case?
Basically the exposed objects. (theyre referred to as instances by Squirrel)
Fixes #698