Edit of asset "eco-state-machine" Accepted

Old/Current New/Edit
Title eco-state-machine eco-state-machine
Description Finite state machine script that supports timers, condition evaluation and imbricated statements.

This script has no depency and should be compatible with any Godot version.

Installation:
Copy the fsm.gd script file in your project.

Usage:
You don't need to change your existing code. Simply add this code where you need the machine :
onready var my_fsm=preload("fsm.gd").new()

my_fsm.add_state("state1")
my_fsm.add_state("whatever state")
my_fsm.add_link("state1","whatever state","condition",[self,"my_condition1","expected value to switch"])
my_fsm.set_state("state1")

func my_condition1():
return some_value

Then in a loop, like _process(delta), call :
my_fsm.process(delta)

To catch the signal when the current state changes:
my_fsm.connect("state_changed",self,"on_state_changed")

More documentation and examples on the Github page.
Finite state machine script that supports timers, condition evaluation and imbricated statements.

This script has no depency and should be compatible with any Godot version.

Installation:
Copy the fsm.gd script file in your project.

Usage:
You don't need to change your existing code. Simply add this code where you need the machine :
onready var my_fsm=preload("fsm.gd").new()

my_fsm.add_state("state1")
my_fsm.add_state("whatever state")
my_fsm.add_link("state1","whatever state","condition",[self,"my_condition1","expected value to switch"])
my_fsm.set_state("state1")

func my_condition1():
return some_value

Then in a loop, like _process(delta), call :
my_fsm.process(delta)

To catch the signal when the current state changes:
my_fsm.connect("state_changed",self,"on_state_changed")

More documentation and examples on the Github page.
Category Scripts Scripts
License MIT MIT
Repository Provider GitHub GitHub
Repository Url https://github.com/gokudomatic/eco-state-machine https://github.com/gokudomatic/eco-state-machine
Issues Url https://github.com/gokudomatic/eco-state-machine/issues https://github.com/gokudomatic/eco-state-machine/issues
Godot version Godot 2.1
Version String 1.1 1.0
Download Commit v1.1 v1.0
Download Url (Computed) https://github.com/gokudomatic/eco-state-machine/archive/v1.1.zip https://github.com/gokudomatic/eco-state-machine/archive/v1.0.zip
Icon Url https://raw.githubusercontent.com/gokudomatic/eco-state-machine/master/icon.png
https://raw.githubusercontent.com/gokudomatic/eco-state-machine/master/icon.png