PRState is a GameMaker Studio 2 extension that enables you to quickly and easily implement finite state machines on your game objects.
Group your object's Step event into logical units (states) that you can easily switch between using a single command.
Optionally provide a list of states that a given state can legally transition from. Illegal state changes fail automatically.
Optionally pass up to 3 internal data parameters of any type from state to state.
Easily have your object switch to whatever its previous state was with a single command.
The convenient "mode" argument passed to your method/function will tell you when you should run your state setup code, when to run state cleanup code and when to run your core state implementation code.
Turn on and off verbose logging so that you can watch when your objects are switching states to make sure they are running as desired.
Includes a handy code snippet to speed up your state code implementation. Just copy & paste it into your object code and fill it in!
Includes example rooms, code samples, documentation and useful comments that you can learn from.
Say good-bye to huge, unwieldy Step events and hello to state-switching simplicity and code organization.