GameMaker State System
A downloadable tool
Download NowName your own price
-| HOW TO SETUP |-
- Inside the Create just set a new machine via kStateMachine();
- Setup some states to use by the machine via kState();
- When setting up is finished, below, setup the Initialize(); Event to add newly created states to the machine, for that use the AddState(); First argument is the callout name and second one is the instance variable of the state you want to add. Lastly you don't have to ofc, but you can setup the starter state inside this event too. Initialize(); Event is made for work only once situations, so you can actually define custom systems&functions inside here too, just to make it look more organized.
- In the end the Create should kinda look like this;
- At the bottom don't forget to call the machine Initialize(); We set up.
- Your's can change but I recommend this way of setting it up, lastly we gotta call the machine's heart Update(); Event, if we set it up an Addition(); Event we gotta call that too, calling hierarch can change for your system.
- I use some draw functions in this example, so i've put those events on the Draw, but your system, your rules. Lastly my state system uses DS_MAP(); So we gotta clean it after we are finished with it, just put the Finish(); Event on the Clear Up and you are ready to go.
- To Access DebugMode just set __LocalDebug to true by writing kStateMachine(true); This will make output panel show information about the system and actually lets you PAUSE all the states of the object that summoned this. Specifically the Update(); Event but no other event should be effected by this Debug Pause. To do activate debug pause, just press your keyboard's PAUSE-BREAK key
MY DISCORD : KOYAN#4300 || koyan
-------------------------------------------
This is a completely free extension that you can download anytime. So please, greatly appreciated if you rate and credit this itch.io page inside your game's page or the game itself.
Download
Download NowName your own price
Click download now to get access to the following files:
Koyan's State System V1.3.2 6.6 kB
Development log
- Version 1.3.2Sep 01, 2023
- Version 1.3Jul 10, 2023
- Version 1.2May 09, 2023
- Version 1.1Mar 31, 2023
Comments
Log in with itch.io to leave a comment.
very goody
clean and handy👍