-
Notifications
You must be signed in to change notification settings - Fork 1
Custom States
Brainy7980 edited this page Jun 20, 2026
·
6 revisions
This engine supports modifying existing states and even making completely new states!
States use HScript files. Callbacks supported at the moment are:
onCreatePre()
onCreate()
onCreatePost()
onUpdate(elapsed:Float)
onUpdatePost(elapsed:Float)
onStepHit()
onBeatHit()
onMeasureHit()State files (including custom states) go in the modsfolder as follows:
mods/modname/states/StateName.hx
In order to make states, I recommend reading source code.
You can switch to custom states by calling
CustomState.switchState(stateName:String);Brainy Engine+ Documentation
Feel free to add things/fix any changes.