state stack (ds stack senum>)
The "history" of all state changes. Holds the enum values of each state that has been used since the last time the history was clearec
state_queue (ds queue senum>)
Holds the enum for all states queued up as part of a state queue.
Useful Variables
These variables are provided for you to use, ideally within a state script.
state timer (real.
This variable counts up from O for each step that is spent in the current state. Verv useful for timing thines within al state.
state_new (boolean
This variable is true only for the first step the state is ran, It will also be true the first step after using
truestate reset currenti)
state var (orray <variqusy)
This array can be utilized in a wide variety of ways. Its core purpose is to allow you to keep track of values that wil persist between stens but will only he relevant to the current state and -in some cases- the beginning of the next.
state.
For example, say you have a charge attack that requires the player to hold button down for a set amount of time for different effects. Instead of creating a new "charge hold time" variable, you just use state varf0l, put a comment on it so you know what you are using it for for macro or enum) and then in the next state you can use state varlol fol something else.
It's a bit strange at first, but every time vou go back to your create event to initialize a variable that only one state cares about, ask yourself if you could just use state varll instead.