Skip to content

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()
onSectionHit()

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.

Custom States

You can switch to custom states by calling

CustomState.switchState(stateName:String);

Clone this wiki locally