Codename LogoCodename Logo

funkin.backend.scripting.events.NoteHitEvent

APIWiki

Constructor

Variables

accuracy:Null<Float>

Accuracy gained from pressing this note. From 0 to 1. null means no accuracy is gained.

animSuffix:String

Suffix of the animation. "-alt" for alt notes, "" for normal ones.

character:Character

Character that pressed the note.

characters:Array<Character>

Characters that pressed the note.

@:value(true)countAsCombo:Bool = true

Whether this hit increases combo.

@:value(true)countScore:Bool = true

Whether this hit increases the score

direction:Int

Direction of the press (0 = Left, 1 = Down, 2 = Up, 3 = Right)

@:value(true)forceAnim:Null<Bool> = true

Whenever the animation should be forced to play (if it's null it will be forced based on the sprite's data xml, if it has one).

healthGain:Float

The amount of health that'll be gained from pressing that note. If called from onPlayerMiss, the value will be negative.

@:value(true)misses:Bool = true

Whenever a miss should be added.

note:Note

Note that has been pressed

noteType:String

Note Type name (null if default note)

@:value(true)numAntialiasing:Bool = true

Whenever antialiasing should be enabled on combo number.

@:value(0.5)numScale:Float = 0.5

Scale of combo numbers.

player:Bool

Whenever the Character is a player

@:value("sick")rating:String = "sick"

Rating name. Defaults to "sick", "good", "bad" and "shit". Customisable.

@:value(true)ratingAntialiasing:Bool = true

Whenever antialiasing should be enabled on ratings.

ratingPrefix:String

Prefix of the rating sprite path. Defaults to "game/score/"

@:value(0.7)ratingScale:Float = 0.7

Scale of ratings.

ratingSuffix:String

Suffix of the rating sprite path.

score:Int

Score gained after note press.

@:value(null)showRating:Null<Bool> = null

Whenever ratings should be shown or not.

@:value(false)showSplash:Bool = false

Whenever a splash should be shown when the note is hit.

Methods

View in GitHub

preventAnim():Void

Prevents the default sing animation from being played.

View in GitHub

preventCamZooming():Void

Prevents the camera zoom every 4 beats from enabling.

View in GitHub

preventDeletion():Void

Prevents the note from being deleted.

View in GitHub

preventLastSustainHit():Void

Prevents the sustain tail (the last one) from being automatically hit when the sustain before it is hit.

View in GitHub

preventStrumGlow():Void

Prevents the strum from glowing after this note has been pressed.

View in GitHub

preventVocalsMute():Void

Prevents the vocals volume from being muted in case its a parameter of onPlayerMiss

View in GitHub

preventVocalsUnmute():Void

Prevents the vocals volume from being set to 1 after pressing the note.

View in GitHub

@:value({ forceAnim : true, ratingAntialiasing : true, ratingScale : 0.7, numAntialiasing : true, numScale : 0.5, showSplash : false, rating : "sick", showRating : null, countScore : true, countAsCombo : true, misses : true })recycle(misses:Bool = true, countAsCombo:Bool = true, countScore:Bool = true, ?showRating:Bool, note:Note, characters:Array<Character>, player:Bool, noteType:String, animSuffix:String, ratingPrefix:String, ratingSuffix:String, direction:Int, score:Int, accuracy:Null<Float>, healthGain:Float, rating:String = "sick", showSplash:Bool = false, numScale:Float = 0.5, numAntialiasing:Bool = true, ratingScale:Float = 0.7, ratingAntialiasing:Bool = true, forceAnim:Bool = true):NoteHitEvent

Inherited Variables

Defined by CancellableEvent

@:value({ })data:Dynamic = { }

Additional data if used in scripts

Inherited Methods

Defined by CancellableEvent

View in GitHub

@:value({ c : false })preventDefault(c:Bool = false):Void

Prevents default action from occurring.

Parameters:

c

Whenever the scripts following this one should be called or not. (Defaults to true)

View in GitHub

toString():String

Returns a string representation of the event, in this format: [CancellableEvent] [CancellableEvent (Cancelled)]

Returns:

String