Object State Machine

An asset by lowlevel.1989
The page banner background of a mountain and forest
Object State Machine thumbnail image
Object State Machine thumbnail image
Object State Machine thumbnail image
Object State Machine hero image

Quick Information

0 ratings
Object State Machine icon image
lowlevel.1989
Object State Machine

state machine without node for godot 3/4Documentation in the repository: https://github.com/lowlevel-1989/object_state_machine# Changelog## [0.7.2] - 2023-03-10### Changed- Fix Version plugin## [0.7.1] - 2023-03-10### Added- Debug Comming Soon### Changed- Fix remote debug## [0.7.0] - 2023-03-04### Added- Graphical state machine for the reference model### Changed- KinematicBody2D platform demo for Godot v3 (update)- CharacterBody2D platform demo for Godot v4 (update)## [0.6.1] - 2023-02-28### Changed- KinematicBody2D platform demo for Godot v3 (update)- CharacterBody2D platform demo for Godot v4 (update)## [0.6.0] - 2023-02-28### Added- LICENSE- README.md- support Godot v3- KinematicBody2D platform demo for Godot v3- CharacterBody2D platform demo for Godot v4- new node -> node_state_machine- new method -> void StateAbstract::confirm_transition()- new method -> void StateAbstract::create(name : String)- new method -> void StateMachine::create(name : String)### Changed- plugin.gd -> commend for support godot v3, default support v4

Supported Engine Version
4.0
Version String
0.7.2
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Object State Machine

  1. Install directly from Godot Asset Library

or

  1. Download this respository, move lowlevel-1989/object_state_machine to your {project_dir}

  2. Enable it from Project -> Settings -> Plugin

Getting Started

NodeStateMachine

  • To create a state machine add the NodeStateMachine to the desired object as shown in the demo.

Class

StateAbstract, abstract class that allows to define the different states

to define a new state you must create a class from the StateAbstract class and define its behavior.

Public methods
  • void StateAbstract::create(owner路:路Node,路state_machine路:路StateMachine)
  • Node StateAbstract::get_owner()
  • void StateAbstract::transition_to(state:路StateAbstract)
  • String StateAbstract::get_name()
  • bool StateAbstract::is_class_state_machine()
  • bool StateAbstract::is_class_state()
virtual methods
  • void StateAbstract::_enter()
  • void StateAbstract::_exit()
  • void StateAbstract::_input(event : InputEvent)
  • void StateAbstract::_process(delta : float)
  • void StateAbstract::_physics_process(delta : float)
  • void StateAbstract::_integrate_forces(state : Object)
private methods
  • void StateAbstract::_set_name()

StateMachine

in charge of administering the states.

signals
  • transitioned(current : StateAbstract, next : StateAbstract)
Public methods
  • void StateMachine::create(name : String)
  • void StateMachine::set_init_state(state : StateAbstract)
  • void StateMachine::transition_debug_enable()
  • void StateMachine::transition_debug_disable()
  • StateAbstract StateMachine::get_current_state()
  • StateAbstract StateMachine::get_prev_state()
  • void StateMachine::transition_to()
  • void StateMachine::input()
  • void StateMachine::process(delta : float)
  • void StateMachine::physics_process(delta : float)
  • void StateMachine::integrate_forces(state : Object)
  • void StateMachine::is_class_state_machine()
  • void StateMachine::is_class_state()

support Godot v3

file plugin.gd

# Seguir instrucciones para agregar soporte a godot v3
@tool  # <- Comentar   @tool para godot v3

# tool # <- Descomentar tool para godot v3

extends EditorPlugin

func _enter_tree() -> void:
    # Initialization of the plugin goes here.
    print("Object State Machine 0.6.0")


func _exit_tree() -> void:
    # Clean-up of the plugin goes here.
    pass

leave it this way

# Seguir instrucciones para agregar soporte a godot v3
# @tool  # <- Comentar   @tool para godot v3

tool # <- Descomentar tool para godot v3

extends EditorPlugin

func _enter_tree() -> void:
    # Initialization of the plugin goes here.
    print("Object State Machine 0.6.0")


func _exit_tree() -> void:
    # Clean-up of the plugin goes here.
    pass

state machine without node for godot 3/4

Documentation in the repository: https://github.com/lowlevel-1989/object_state_machine

# Changelog

## [0.7.2] - 2023-03-10

### Changed
- Fix Version plugin

## [0.7.1] - 2023-03-10

### Added
- Debug Comming Soon

### Changed
- Fix remote debug

## [0.7.0] - 2023-03-04

### Added
- Graphical state machine for the reference model

### Changed
- KinematicBody2D platform demo for Godot v3 (update)
- CharacterBody2D platform demo for Godot v4 (update)

## [0.6.1] - 2023-02-28

### Changed
- KinematicBody2D platform demo for Godot v3 (update)
- CharacterBody2D platform demo for Godot v4 (update)

## [0.6.0] - 2023-02-28

### Added

- LICENSE
- README.md
- support Godot v3
- KinematicBody2D platform demo for Godot v3
- CharacterBody2D platform demo for Godot v4
- new node -> node_state_machine
- new method -> void StateAbstract::confirm_transition()
- new method -> void StateAbstract::create(name : String)
- new method -> void StateMachine::create(name : String)

### Changed
- plugin.gd -> commend for support godot v3, default support v4

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Object State Machine icon image
lowlevel.1989
Object State Machine

state machine without node for godot 3/4Documentation in the repository: https://github.com/lowlevel-1989/object_state_machine# Changelog## [0.7.2] - 2023-03-10### Changed- Fix Version plugin## [0.7.1] - 2023-03-10### Added- Debug Comming Soon### Changed- Fix remote debug## [0.7.0] - 2023-03-04### Added- Graphical state machine for the reference model### Changed- KinematicBody2D platform demo for Godot v3 (update)- CharacterBody2D platform demo for Godot v4 (update)## [0.6.1] - 2023-02-28### Changed- KinematicBody2D platform demo for Godot v3 (update)- CharacterBody2D platform demo for Godot v4 (update)## [0.6.0] - 2023-02-28### Added- LICENSE- README.md- support Godot v3- KinematicBody2D platform demo for Godot v3- CharacterBody2D platform demo for Godot v4- new node -> node_state_machine- new method -> void StateAbstract::confirm_transition()- new method -> void StateAbstract::create(name : String)- new method -> void StateMachine::create(name : String)### Changed- plugin.gd -> commend for support godot v3, default support v4

Supported Engine Version
4.0
Version String
0.7.2
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers