Community

SCI Programming => SCI Syntax Help => Topic started by: Doan Sephim on December 01, 2021, 01:58:07 PM

Title: [Solved] changeState question
Post by: Doan Sephim on December 01, 2021, 01:58:07 PM
If I have a state set to run for so many cycles then move to the next state, is there a way to nullify that if I manually change to a different state in the same script. I feel like this is a very simple thing, but I don't know how to do it.
Title: Re: changeState question
Post by: doomlazer on December 01, 2021, 03:42:16 PM
Is (= cycles 0) not working? I just tested that I was able to cancel a cycles-based state change from within a script's (doit) by setting to 0.
Title: Re: changeState question
Post by: Doan Sephim on December 01, 2021, 04:03:27 PM
Is (= cycles 0) not working? I just tested that I was able to cancel a cycles-based state change from within a script's (doit) by setting to 0.
Nice! That seems to work perfectly. I knew it would be something simple! and I don't know how I didn't think of that
Title: Re: [Solved] changeState question
Post by: doomlazer on December 01, 2021, 04:26:22 PM
I've had to do that before, which is the only reason I knew. FYI, you can cancel it outside the script as well if needed: (scriptName cycles: 0)
Title: Re: [Solved] changeState question
Post by: Doan Sephim on December 01, 2021, 04:50:27 PM
I've had to do that before, which is the only reason I knew. FYI, you can cancel it outside the script as well if needed: (scriptName cycles: 0)
That's good info to know. Thank you