Finite State Machine Plugin and Behavior

FSM Single Global Plugin

The Finite State Machine (FSM) Plugin for Construct 3 is a comprehensive solution consisting of two add-ons: a Behavior Add-on for FSM and a Global FSM Plugin. This unique combination empowers developers to manage and control game states with precision, ensuring a seamless and well-structured game flow. Whether you’re creating an RPG, a platformer, or an action-packed shooter, FSM provides the tools needed to keep your game’s logic organized.

Key Features:

  • Two Add-ons for Ultimate Flexibility:

    • FSM Behavior Add-on: This add-on lets you assign FSM states to individual game objects. Each object can have its own specific state machine, providing greater flexibility in managing game logic for specific entities.

    • FSM Global Plugin: The Global FSM Plugin manages overall game states, such as GAME_LOADING, GAME_READY, GAME_STARTED, GAME_PAUSED, and GAME_COMPLETED. It centralizes control, ensuring consistent game state management across the entire project.

  • Efficient State Management: Whether managing individual objects or the entire game, FSM allows you to lock game events and behaviors to the active game state. This ensures that certain actions, such as player input, are only permitted when appropriate (e.g., blocking player input during GAME_LOADING or GAME_PAUSED).

  • Highly Customizable States: Both add-ons allow you to define and manage custom game states. You can easily name states based on your game’s design, helping you maintain readability and organization in your code.

  • Seamless Integration: With FSM, integrating these add-ons into your project is straightforward. Whether you’re using the Behavior Add-on to handle individual game objects or the Global Plugin to control the game’s broader state transitions, both add-ons work together to ensure a cohesive game logic system.

FSM

Finite State Machine Global Plugin for C3 allows you to create and manage global game states to better structure your game events and overall flow.

Download

Actions


Change State

Changes the FSM state to the one specified.

Parameter

Description

State

State name

Conditions


Compare Current State

Evaluates if FSM's current state equals the input string

Parameter

Description

State

State name

On Any State Changed

Triggered on any state change.

On State Changed

Triggered when the indicated state is set by the action 'Change State'

Parameter

Description

State

State name

On State Finished

Whenever you change the state of the FSM, the current state is marked as finished and the On Finished state is triggered. The new state won't be processed by this event at this point.

Parameter

Description

State

State name

Compare Previous State

Evaluates if FSM's previous state equals input string

Parameter

Description

State

State name

Expressions


GetCurrentState

Returns the current FSM state

GetPreviousState

Returns the previous FSM state

(c) Pixel Perfect Studio 2025

Last updated

Was this helpful?