Contains all callbacks you can add in modcharts and stage scripts.

NOTE: In case you're scripting a stage, all sprites of that stage are directly accessible via their name.

Ex: If you added a superCoolBG element in your stage XML, you'll be able to access it via scripts by using superCoolBG.

Methods

beatHit(curBeat:Int):Void

Triggered every beat.

Parameters:

curBeat

Current beat.

create():Void

Triggered after the characters has been created, during PlayState's creation.

inputPostUpdate(event:InputSystemEvent):Void

Triggered after the input system updates.

Parameters:

note

Event object with the pressed, justPressed and justReleased notes.

inputUpdate(event:InputSystemEvent):Void

Triggered whenever the input system updates.

Parameters:

note

Event object with the pressed notes, which allows you to alter which notes are being pressed during this frame, or simply cancel the input update.

onCountdown(event:CountdownEvent):Void

Triggered every countdown.

Parameters:

event

Countdown event.

onDadHit(event:NoteHitEvent):Void

Triggered whenever the opponent hits a note.

Parameters:

note

Event object with the note being pressed, the character who pressed it, and functions to alter or cancel the default behaviour.

onNoteCreation(event:NoteCreationEvent):Void

Triggered on each note creation

Parameters:

event

Event object containing information about the note.

onPlayerHit(event:NoteHitEvent):Void

Triggered whenever the player hits a note.

Parameters:

note

Event object with the note being pressed, the character who pressed it, and functions to alter or cancel the default behaviour.

onPostCountdown(event:CountdownEvent):Void

Triggered after every countdown.

Parameters:

event

Countdown event.

onStrumCreation(event:StrumCreationEvent):Void

Triggered on each strum creation

Parameters:

event

Event object containing information about the strum.

onSubstateClose(event:StateEvent):Void

Triggered on substate close.

Parameters:

event

Event object containing the substate, which is cancellable.

onSubstateOpen(event:StateEvent):Void

Triggered on substate open.

Parameters:

event

Event object containing the substate, which is cancellable.

postCreate():Void

Triggered at the very end of PlayState's creation

postUpdate(elapsed:Float):Void

Triggered at the end of every frame.

Parameters:

elapsed

Time elapsed since last frame.

stepHit(curStep:Int):Void

Triggered every step

Parameters:

curStep

Current step.

update(elapsed:Float):Void

Triggered every frame.

Parameters:

elapsed

Time elapsed since last frame.