armandoalonso / fsm Goto Github PK
View Code? Open in Web Editor NEWA Finite State Machine (FSM) Behavior, Used to control the flow of logic for objects in Construct3
A Finite State Machine (FSM) Behavior, Used to control the flow of logic for objects in Construct3
I know this was also not supported in the old FSM addon, but would be awesome if it could be added. (if possible)
FSMdebug.zip
steps to reproduce:
observed:
keeps logging this error and creates infinite behavior instances
When I am using a FSM I often have the same logic that should run when the FSM is one of many states.
This can currently be solve like this:
with an or block, the downside of this is that the conditions can get very long and more importantly it's fairly heavy as the event system loops over the picked instances once per condition.
To fix that I sometimes use a conditional operator like this:
this solves the performance overhead, but becomes hard to read because of the repeated "player.FSM.CurrentState ="
So my suggested solution would be an alternative condition where we can put in a list of states, it could look something like this:
so it allows for a variable number of arguments separated by commas, if possible.
I guess one might argue you are not supposed to use a state machine like this, maybe? But to me this seems like a sensible thing to do.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.