A Finite State Machine (FSM) Behavior, Used to control the flow of logic for objects
Author: piranha305
Website: https://piranha305.itch.io/
Addon Url: https://www.construct.net/en/make-games/addons/1089/fsm
Download Latest Version : Version: 1.0.0.3
Made using c3ide2-framework
To build the addon, run the following commands:
npm i
node ./build.js
To run the dev server, run
npm i
node ./dev.js
The build uses the pluginConfig file to generate everything else. The main files you may want to look at would be instance.js and scriptInterface.js
Property Name | Description | Type |
---|---|---|
Enabled | Enable or disable the FSM | check |
Initial State | The initial state of the FSM (does not trigger OnStateEnter) | text |
Action | Description | Params |
---|---|---|
Go to state | Transition to a specific state | State (string) |
Enable | Enable or disable the FSM | Enabled (boolean) |
Condition | Description | Params |
---|---|---|
On any state change | Triggered when state changes | |
On state enter | Triggered when a specific state is entered | State (string) |
On state exit | Triggered when a specific state is exited | State (string) |
On state transition | Triggered when a specific state transition occurs | From (string) To (string) |
Current state is | Check if the current state is a specific state | State (string) |
Previous state is | Check if the previous state is a specific state | State (string) |
Is enabled | Check if the FSM is enabled | |
Current state in list | Check if the current state is in a list of states, (comma separated list of states) | States (string) |
Previous state in list | Check if the previous state is in a list of states, (comma separated list of states) | States (string) |
On state enter in list | Triggered when a specific state is entered from a comma separated list of states | States (string) |
On state exit in list | Triggered when a specific state is exited from a comma separated list of states | States (string) |
Expression | Description | Return Type | Params |
---|---|---|---|
CurrentState | The current state | string | |
PreviousState | The previous state | string |