-
Notifications
You must be signed in to change notification settings - Fork 192
Events
Wizard edited this page Aug 25, 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()
.
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. |
Argument | Type | Description |
---|---|---|
animCancelled | bool | |
deleteNote | bool | |
stunned | bool | |
resetCombo | bool | |
playMissSound | bool | |
note | Note | The missed note. |
score | int | |
misses | int | |
muteVocals | bool | |
healthGain | float | The amount of health that'll be gained from missing that note. If called from onPlayerMiss , the value will be negative. |
missSound | string | |
missVolume | float | |
ghostMiss | bool | |
gfSad | bool | |
gfSadAnim | string | |
forceGfAnim | bool | |
forceAnim | bool | If the animation should be forced to play. |
animSuffix | string | Suffix of the animation. "miss" for miss notes, "-alt" for alt notes, "" for normal ones. |
character | Character | Character that missed the note. |
characters | array | Characters that missed the note. |
playerID | int | |
noteType | string | Note Type name. (null if default note) |
direction | int | Direction of the miss (0 = Left, 1 = Down, 2 = Up, 3 = Right) |
accuracy | float | Accuracy gained from pressing this note. From 0 to 1. null means no accuracy is gained. |
preventMissSound | FUNCTION | Prevents the miss sound from played. |
cancelMissSound | FUNCTION | Prevents the miss sound from played. |
preventResetCombo | FUNCTION | Prevents the combo from being reset. |
cancelResetCombo | FUNCTION | Prevents the combo from being reset. |
preventStunned | FUNCTION | Prevents the default sing animation from being played. |
cancelStunned | FUNCTION | Prevents the default sing animation from being played. |
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 . |
get_character | FUNCTION | Returns the character. |
set_character | FUNCTION | Sets the character. |
Argument | Type | Description |
---|---|---|
note | Note | The note being updated. |
elapsed | float | The time since the last frame. |
strum | Strum | The note's strum. |
preventWindowUpdate | FUNCTION | Cancels the hit window update. |
cancelWindowUpdate | FUNCTION | Cancels the hit window update. |
preventAutoCPUHit | FUNCTION | Cancels the automatic CPU hit. |
cancelAutoCPUHit | FUNCTION | Cancels the automatic CPU hit. |
preventPositionUpdate | FUNCTION | Cancels the note position update (note will freeze). |
cancelPositionUpdate | FUNCTION | Cancels the note position update (note will freeze). |
Argument | Type | Description |
---|---|---|
music | string | The music to be played. |
options | array | The list of options. |
Argument | Type | Description |
---|---|---|
animName | string | The name of the animation. |
force | bool | If the animation should be forced. |
reverse | bool | If the animation should be played in reverse. |
startingFrame | int | Which frame the animation will start playing. |
context | PlayAnimContext | The context of the animation. |
Argument | Type | Description |
---|---|---|
x | float | X position. |
y | float | Y position. |
Argument | Type | Description |
---|---|---|
rating | ComboRating | New combo. |
oldRating | ComboRating | Old combo. May be null . |
Argument | Type | Description |
---|---|---|
width | int | New width. |
height | int | New height. |
oldWidth | int | Old width. May be null . |
oldHeight | int | Old height. May be null . |
Argument | Type | Description |
---|---|---|
note | Note | The affected note. |
Argument | Type | Description |
---|---|---|
stage | Stage | The stage instance. |
node | access | The node being parsed. |
sprite | dynamic | The parsed sprite. |
name | string | The name of the node. Shortcut to event.node.name . |
Argument | Type | Description |
---|---|---|
stage | Stage | The stage instance. |
xml | access | The xml. |
sprite | dynamic | The parsed sprite. |
elems | array | The parsed object. (note: look into this, i'm not sure) |
Argument | Type | Description |
---|---|---|
substate | FlxState | The substate about to be opened/closed. |
Argument | Type | Description |
---|---|---|
strum | Strum | The strum being created. |
player | int | The player ID. |
strumID | int | The strum ID, for the sprite. |
animPrefix | string | The prefix of the animation (left = arrowLEFT , left press , left confirm ). |
sprite | string | The path of the sprite, default is "game/notes/default ". |
preventAnimation | FUNCTION | Cancels the animation that makes the strum "land" in the strumline. |
cancelAnimation | FUNCTION | Cancels the animation that makes the strum "land" in the strumline. |
Argument | Type | Description |
---|---|---|
week | WeekData | The week to be selected. |
difficulty | string | The difficulty that has been selected. |
weekID | int | Which week was selected. Goes from 0 to weeks.length - 1 . |
difficultyID | int | Which difficulty was selected. Goes from 0 to difficulties.length - 1 . |
dm @wizardmantis441 if anything needs to be updated thanks bestie