A script that can be tied to a Module, which persists across states. Create a scripted class that extends Module to use this.

Static methods

staticinit(clsName:String, moduleId:String, ?priority:Int, ?params:ModuleParams):ScriptedModule

Initializes a scripted class instance using the given scripted class name and constructor arguments.

staticlistScriptClasses():Array<String>

Returns a list of all the scripted classes which extend this class.

staticscriptStaticCall(clsName:String, funcName:String):Dynamic

Call a custom static function on a scripted class, by the given name, with the given arguments.

staticscriptStaticGet(clsName:String, fieldName:String):Dynamic

Retrieves a custom static variable on a scripted class, by the given name.

@:value({ fieldValue : null })staticscriptStaticSet(clsName:String, fieldName:String, ?fieldValue:Dynamic):Dynamic

Sets the value of a custom static variable on a scripted class, by the given name.

Constructor

new(moduleId:String, ?priority:Int, ?params:Null<ModuleParams>)

Methods

onBeatHit(event:SongTimeScriptEvent):Void

Polymod HScriptedClass override of onBeatHit.

Called when a beat is hit in the song.

onCapsuleSelected(event:CapsuleScriptEvent):Void

Polymod HScriptedClass override of onCapsuleSelected.

Called when a capsule is selected.

onCharacterConfirm(event:CharacterSelectScriptEvent):Void

Polymod HScriptedClass override of onCharacterConfirm.

Called when a character has been confirmed.

onCharacterDeselect(event:CharacterSelectScriptEvent):Void

Polymod HScriptedClass override of onCharacterDeselect.

Called when the user presses BACK after confirming a character.

onCharacterSelect(event:CharacterSelectScriptEvent):Void

Polymod HScriptedClass override of onCharacterSelect.

Called when a character is selected.

onCountdownEnd(event:CountdownScriptEvent):Void

Polymod HScriptedClass override of onCountdownEnd.

Called when the countdown ends, but BEFORE the song starts.

onCountdownStart(event:CountdownScriptEvent):Void

Polymod HScriptedClass override of onCountdownStart.

Called when the countdown begins.

onCountdownStep(event:CountdownScriptEvent):Void

Polymod HScriptedClass override of onCountdownStep.

Called for every step in the countdown.

onCreate(event:ScriptEvent):Void

Polymod HScriptedClass override of onCreate.

Called when the module is first created. This happens before the title screen appears!

onDestroy(event:ScriptEvent):Void

Polymod HScriptedClass override of onDestroy.

Called when a module is destroyed. This currently only happens when reloading modules with F5.

onDifficultySwitch(event:CapsuleScriptEvent):Void

Polymod HScriptedClass override of onDifficultySwitch.

Called when the current difficulty is changed.

onFocusGained(event:FocusScriptEvent):Void

Polymod HScriptedClass override of onFocusGained.

Called when the game regains focus. This does not get called if "Pause on Unfocus" is disabled.

onFocusLost(event:FocusScriptEvent):Void

Polymod HScriptedClass override of onFocusLost.

Called when the game loses focus. This does not get called if "Pause on Unfocus" is disabled.

onFreeplayClose(event:FreeplayScriptEvent):Void

Polymod HScriptedClass override of onFreeplayClose.

Called when Freeplay is closed.

onFreeplayIntroDone(event:FreeplayScriptEvent):Void

Polymod HScriptedClass override of onFreeplayIntroDone.

Called when the intro for Freeplay finishes.

onFreeplayOutro(event:FreeplayScriptEvent):Void

Polymod HScriptedClass override of onFreeplayOutro.

Called when the Freeplay outro begins.

onGameOver(event:ScriptEvent):Void

Polymod HScriptedClass override of onGameOver.

Called when the player dies.

onNoteGhostMiss(event:GhostMissNoteScriptEvent):Void

Polymod HScriptedClass override of onNoteGhostMiss.

Called when the player presses a key without any notes present.

onNoteHit(event:HitNoteScriptEvent):Void

Polymod HScriptedClass override of onNoteHit.

Called when a note has been hit. This gets dispatched for both the player and opponent strumlines.

onNoteHoldDrop(event:HoldNoteScriptEvent):Void

Polymod HScriptedClass override of onNoteHoldDrop.

onNoteIncoming(event:NoteScriptEvent):Void

Polymod HScriptedClass override of onNoteIncoming.

Called when a note on the strumline has been rendered and is now onscreen. This gets dispatched for both the player and opponent strumlines.

onNoteMiss(event:NoteScriptEvent):Void

Polymod HScriptedClass override of onNoteMiss.

Called when a note has been missed. This gets dispatched for both the player and opponent strumlines.

onPause(event:PauseScriptEvent):Void

Polymod HScriptedClass override of onPause.

Called when the game is paused.

onResume(event:ScriptEvent):Void

Polymod HScriptedClass override of onResume.

Called when the game is resumed.

onScriptEvent(event:ScriptEvent):Void

Polymod HScriptedClass override of onScriptEvent.

Called when ANY script event is dispatched.

onSongEnd(event:ScriptEvent):Void

Polymod HScriptedClass override of onSongEnd.

Called when the song ends.

onSongEvent(event:SongEventScriptEvent):Void

Polymod HScriptedClass override of onSongEvent.

Called when a song event is triggered.

onSongLoaded(event:SongLoadScriptEvent):Void

Polymod HScriptedClass override of onSongLoaded.

Called when the song's chart has been parsed and loaded.

onSongRetry(event:SongRetryEvent):Void

Polymod HScriptedClass override of onSongRetry.

Called when the song has been restarted.

onSongSelected(event:CapsuleScriptEvent):Void

Polymod HScriptedClass override of onSongSelected.

Called when a song is selected.

onSongStart(event:ScriptEvent):Void

Polymod HScriptedClass override of onSongStart.

Called when the song begins.

onStateChangeBegin(event:StateChangeScriptEvent):Void

Polymod HScriptedClass override of onStateChangeBegin.

Called when the game is about to switch to a new state.

onStateChangeEnd(event:StateChangeScriptEvent):Void

Polymod HScriptedClass override of onStateChangeEnd.

Called after the game has switched to a new state.

onStateCreate(event:ScriptEvent):Void

Polymod HScriptedClass override of onStateCreate.

Called when any state is created.

onStepHit(event:SongTimeScriptEvent):Void

Polymod HScriptedClass override of onStepHit.

Called when a step is hit in the song.

onSubStateCloseBegin(event:SubStateScriptEvent):Void

Polymod HScriptedClass override of onSubStateCloseBegin.

Called when the game is about to close a substate.

onSubStateCloseEnd(event:SubStateScriptEvent):Void

Polymod HScriptedClass override of onSubStateCloseEnd.

Called when a substate has been closed.

onSubStateOpenBegin(event:SubStateScriptEvent):Void

Polymod HScriptedClass override of onSubStateOpenBegin.

Called when the game is about to open a substate.

onSubStateOpenEnd(event:SubStateScriptEvent):Void

Polymod HScriptedClass override of onSubStateOpenEnd.

Called when a substate has been opened.

onUpdate(event:UpdateScriptEvent):Void

Polymod HScriptedClass override of onUpdate.

Called every frame.

@:value({ funcArgs : null })scriptCall(funcName:String, ?funcArgs:Array<Dynamic>):Dynamic

Calls a function of the scripted class with the given name and arguments.

scriptGet(varName:String):Dynamic

Retrieves the value of a local variable of a scripted class.

@:value({ varValue : null })scriptSet(varName:String, ?varValue:Dynamic):Dynamic

Directly modifies the value of a local variable of a scripted class.

Inherited Variables

Defined by Module

@:value(true)active:Bool = true

Whether the module is currently active.

@:value("UNKNOWN")read onlymoduleId:String = "UNKNOWN"

@:value(1000)priority:Int = 1000

Determines the order in which modules receive events. You can modify this to change the order in which a given module receives events.

Priority 1 is processed before Priority 1000, etc.

@:value(null)state:Null<Class<Dynamic>> = null

The state this module is associated with. If set, this module will only receive events when the game is in this state.

Inherited Methods