Skip to content

Custom States

Brainy7980 edited this page Jun 22, 2026 · 6 revisions

As of 0.1.0

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(event:UpdateEvent)
onUpdatePost(event:UpdateEvent)
onStepHit(event:StepHitEvent)
onBeatHit(event:StepHitEvent)
onSectionHit(event:StepHitEvent)
onDestroy(event:ScriptEvent)

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