[go: nahoru, domu]

Skip to content

A Finite State Machine (FSM) Behavior, Used to control the flow of logic for objects in Construct3

Notifications You must be signed in to change notification settings

armandoalonso/fsm

Repository files navigation


FSM

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

Table of Contents


Usage

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

Examples Files





Properties

Property Name Description Type
Enabled Enable or disable the FSM check
Initial State The initial state of the FSM (does not trigger OnStateEnter) text

Actions

Action Description Params
Go to state Transition to a specific state State (string)
Enable Enable or disable the FSM Enabled (boolean)

Conditions

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)

Expressions

Expression Description Return Type Params
CurrentState The current state string
PreviousState The previous state string

About

A Finite State Machine (FSM) Behavior, Used to control the flow of logic for objects in Construct3

Resources

Stars

Watchers

Forks

Packages

No packages published