A script that can be tied to a SongEvent. Create a scripted class that extends SongEvent, then call super('SongEventType') to use this.

  • Override handleEvent(data:SongEventData) to perform your actions when the event is hit.
  • Override getTitle() to return an event name that will be displayed in the editor.
  • Override getEventSchema() to return a schema for the event data, used to build a form in the chart editor.

Static methods

staticinit(clsName:String, id:String):ScriptedSongEvent

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(id:String)

Methods

getEventSchema():SongEventSchema

Polymod HScriptedClass override of getEventSchema.

Retrieves the chart editor schema for this song event type.

Returns:

The schema, or null if this event type does not have a schema.

getIconPath():String

Polymod HScriptedClass override of getIconPath.

Retrieves the asset path to the icon this event type should use in the chart editor. To customize this, override getIconPath().

Returns:

The path to the icon to display.

getTitle():String

Polymod HScriptedClass override of getTitle.

Retrieves the human readable title of this song event type. Used for the chart editor.

Returns:

The title.

handleEvent(data:SongEventData):Void

Polymod HScriptedClass override of handleEvent.

Handles a song event that matches this handler's ID.

Parameters:

data

The data associated with the event.

@: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 SongEvent

id:String

The internal song event ID that this handler is responsible for.

Inherited Methods