Overview
The song event system allows chart creators to trigger gameplay changes at specific points in a song. Events can control camera focus, zoom, character swaps, stage changes, and more.Class Hierarchy
SongEvent
Base class for all song events.Properties
Unique identifier for this event type
If true, events are handled even when skipping forward in the song
Methods
new(id:String, ?params:SongEventParams)
Creates a new event handler.
Event type identifier
Optional parameters (processOldEvents)
handleEvent(data:SongEventData):Void
Handles the event when it’s triggered. Must be overridden.
getEventSchema():SongEventSchema
Returns the chart editor schema for this event.
getTitle():String
Returns the human-readable title.
getIconPath():String
Returns the path to the event’s icon.
Built-in Events
FocusCameraSongEvent
Changes camera focus to a character or position.Event Data
Target: -1 (Position), 0 (Player/BF), 1 (Opponent/Dad), 2 (Girlfriend)
X offset or absolute X position
Y offset or absolute Y position
Tween duration in steps
Easing function: linear, INSTANT, CLASSIC, sine, quad, cube, etc.
Easing direction: In, Out, InOut
Examples
ZoomCameraSongEvent
Changes camera zoom level.Event Data
Target zoom level
Tween duration in steps
“stage” (relative to stage zoom) or “direct” (absolute)
Easing function
Easing direction
Examples
Other Built-in Events
SetCharacterSongEvent- Swaps a character mid-song
- Useful for character transformations
- Changes the entire stage
- Can trigger scene transitions
- Forces a character to play a specific animation
- Useful for cutscenes
- Changes scroll speed mid-song
- Can speed up or slow down gameplay
- Controls camera bop intensity
- Affects camera “bounce” on beats
- Changes a character’s health icon
- Useful for character transformations
Creating Custom Events
Basic Custom Event
Advanced Custom Event
Event Data Access
Reading Event Values
Event Schema Types
Field Types
Schema Example
Easing Functions
Available easing functions from FlxEase:linearsine,quad,cube,quart,quintexpo,circ,back,bounce,elasticsmoothStep,smootherStep
In- Slow start, fast endOut- Fast start, slow endInOut- Slow start and end
Usage in Charts
Chart JSON Format
Event timestamp in milliseconds
Event type ID
Event-specific values/parameters
Best Practices
Event schemas are used by the chart editor to provide a user-friendly interface. Well-defined schemas make events easier to use.
