Author Topic: [Solved] changeState question  (Read 760 times)

0 Members and 1 Guest are viewing this topic.

Offline Doan Sephim

[Solved] changeState question
« 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.
« Last Edit: December 01, 2021, 04:03:57 PM by Doan Sephim »


Artificial Intelligence Competition

Offline doomlazer

Re: changeState question
« Reply #1 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.

Offline Doan Sephim

Re: changeState question
« Reply #2 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

Offline doomlazer

Re: [Solved] changeState question
« Reply #3 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)

Offline Doan Sephim

Re: [Solved] changeState question
« Reply #4 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


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.117 seconds with 23 queries.