Skip to content
Wizard edited this page Aug 24, 2023 · 36 revisions

Events called through functions, should be simple? i think idk man i'm not even close to done writing all this lmaoo

NOTE: all events can be cancelled by using event.cancel(); EXCEPT for when you are using function onGetCamPos().

Example of Usage

function onPlayerHit(event:NoteHitEvent) {
  event.animSuffix = "-alt"; // each note hit plays `animation`-alt
  event.preventStrumGlow(); // example of using a function
}
Argument Type Description
amount int Amount lmao
Argument Type Description
position FlxPoint Final camera position.
strumLine StrumLine Currently focused strumline.
focusedCharacters int Number of focused characters.
Argument Type Description
swagCounter int At which count the countdown is. Normally goes 0-1-2-3-4 unless PlayState.instance.introLength is changed.
volume float Volume at which the intro countdown sound will play.
soundPath string Path of the intro sound that'll be played.
spritePath string Path to the sprite path that'll be shown.
scale float Scale of the sprite.
antialiasing bool Whenever antialiasing is enabled or not.
sprite FlxSprite Created sprite, only available in onPostCountdown.
spriteTween FlxTween Created tween for the sprite, only available in onPostCountdown.
sound FlxSound Created sound, only available in onPostCountdown.
Argument Type Description
danced bool
Argument Type Description
animName string Default animation that will be played.
direction int In which direction the animation will be played.
suffix string The suffix of the animation (ex: "-alt") - Defaults to "".
context PlayAnimContext Context of the animation. Is either equal to SING or MISS.
reversed bool Whenever the animation will play reversed or not.
frame int At what frame the animation will start playing.
animName string Default animation that will be played.
force bool Whether to force the animation.
Argument Type Description
presenceData DiscordPresenceOptions OR Dynamic Object containing all of the data for the presence.

nothing yet :/

Argument Type Description
event ChartEvent I have seen the word "event" too many times.
Argument Type Description
idleAlpha float The alpha when nothing is playing and isn't selected.
idlePlayingAlpha float The alpha when something is playing and isn't selected.
selectedAlpha float The alpha when nothing is playing and selected.
selectedPlayeingAlpha float The alpha when something is playing and selected.
lerp float The lerp of the alpha.
Argument Type Description
song string Song name that is about to be played.
difficulty string Difficulty name.
opponentMode bool Whether opponent mode is enabled.
coopMode bool Whether coop mode is enabled.
Argument Type Description
pressed array Array containing whenever a specific control is pressed or not. For example, pressed[0] will return whenever the left strum was pressed.
justPressed‎ array Array containing whenever a specific control is pressed (not hold) this frame or not. For example, justPressed[0] will return whenever the left strum was just pressed.
justReleased array Array containing whenever a specific control was released this frame or not. For example, justReleased[0] will return whenever the left strum was just released.
strumLine StrumLine Strumline in which the input is being processed.
strumLineID int ID of the Strumline.
Argument Type Description
oldValue int Value before the change.
value int Value after the change.
change int Amount of change.
playMenuSFX bool If the menu SFX should be played.
Argument Type Description
name string Name!
Argument Type Description
note Note The note being created.
strumID int ID of the strum.
noteType string Note Type (ex. "Hurt Note").
noteTypeID int ID of the Note Type.
strumLineID int ID of the strumline the note is made for.
mustHit bool If the note needs to be hit by the player.
noteSprite string Note sprite.
noteScale float Note scale.
animSuffix string Sing animation suffix. "-alt" for alt anim or "" for normal notes.
Argument Type Description
animCancelled bool
strumGlowCancelled bool
deleteNote bool
unmuteVocals bool
enableCamZooming bool
autoHitLastSustain bool
misses bool
countAsCombo bool
countScore bool
showRating bool
note Note The note that was pressed.
character Character Character that pressed the note.
characters array Characters that pressed the note.
player bool Whether the Character is a player.
noteType string The Note Type name. Is null if default note.
animSuffix string Suffix of the animation. "-alt" for alt notes, "" for normal ones.
ratingPrefix string Prefix of the rating sprite path. Defaults to "game/score/".
ratingSuffix string Suffix of the rating sprite path.
direction int Direction of the press (0 = Left, 1 = Down, 2 = Up, 3 = Right)
score int Score gained after pressing the note.
accuracy float Accuracy gained from pressing this note. From 0 to 1. null means no accuracy is gained.
healthGain float The amount of health that'll be gained from pressing that note. If called from onPlayerMiss, the value will be negative.
rating string Rating name. Defaults to "sick", "good", "bad" and "shit". Customizable.
showSplash bool Whether a splash should be shown when the note is hit.
numScale float Scale of combo numbers.
numAntialiasing bool Whether antialiasing should be enabled on combo numbers.
ratingScale float Scale of ratings.
ratingAntialiasing bool Whether antialiasing should be enabled on ratings.
forceAnim bool Whether the animation should be forced to play.
preventAnim FUNCTION Prevents the default sing animation from being played.
cancelAnim FUNCTION Prevents the default sing animation from being played.
preventDeletion FUNCTION Prevents the note from being deleted.
cancelDeletion FUNCTION Prevents the note from being deleted.
preventVocalsUnmute FUNCTION Prevents the vocals volume from being set to 1 after pressing the note.
cancelVocalsUnmute FUNCTION Prevents the vocals volume from being set to 1 after pressing the note.
preventVocalsMute FUNCTION Prevents the vocals volume from being muted in case its a parameter of onPlayerMiss.
cancelVocalsMute FUNCTION Prevents the vocals volume from being muted in case its a parameter of onPlayerMiss.
preventCamZooming FUNCTION Prevents the camera bump from enabling.
cancelCamZooming FUNCTION Prevents the camera bump from enabling.
preventLastSustainHit FUNCTION Prevents the sustain tail (the last one) from being automatically hit when the sustain before it is hit.
cancelLastSustainHit FUNCTION Prevents the sustain tail (the last one) from being automatically hit when the sustain before it is hit.
preventStrumGlow FUNCTION Prevents the strum from glowing after this note has been pressed.
cancelStrumGlow FUNCTION Prevents the strum from glowing after this note has been pressed.
get_character FUNCTION Returns the character.
set_character FUNCTION Sets the character.

unfinished obv lmao

Clone this wiki locally