Skip to the content.

Instance Variables

Field Name Type Initial Value Description
absorbable Bool false When true, the hitbox is able to trigger absorb-related events when it connects with an absorb collision box. Absorb events are only receivable by projectiles, and the resulting behavior is determined by the individual projectile receiving the absorb event.
angle Float 0 The angle of knockback. Expects an angle between 0 and 360, or alternatively a SpecialAngle value. Note that when a foe takes damage this number is modified in the resulting HIT_RECEIVED/HIT_DEALT GameObjectEvents. Use rawAngle if you want the original value.
attackId Int 0 Attack identfier for the stats
attackRatio Float 1 A multiplier that is applied to knockback after the final knockback calculation has been done.
attackStrength Int null Use this alongside the element to determine the hit sound and hit effect.
@see AttackStrength
baseKnockback Float 0 Base power.
bodyX Float 0 X location of the owner GameObject. Generally this is auto-populated to match the position of the owner, except in cases HitboxStats were generated by hand in which case an owning object may not exist.
bodyY Float 0 Y location of the owner GameObject. Generally this is auto-populated to match the position of the owner, except in cases HitboxStats were generated by hand in which case an owning object may not exist.
damage Float 0 The amount of damage that the hitbox deals to foes.
directionalInfluence Bool true Setting to false will disable post-hitstop directional influence among hit foes.
disabled Bool false If true, the hitbox will behave as though it did not exist (it will not interact with other boxes).
element Int null What element the attack is
@see AttackElement
flinch Bool true Setting to false will make the move not break grabs nor send the foe into the hurt animation.
forceTumbleFall Bool false @deprecated When true, the attack will always cause foes to go into their tumble state when hit. This stat has been deprecated, please use tumbleType stat instead
hitEffectOverride String null Use a custom hit Vfx. By default, the engine assumes this is an animation name from from the GlobalVfx sprite (See GlobalVfx constnats). You can however use other Vfx animations by specifying the full content id of the Vfx sprite followed by a hash "#" specifying the animation you want to play. (e.g. "namespace::resource.spriteId#animationId")
hitSoundOverride String null How long the foe will be held in place before knockback is applied.
hitstop Int -1 Determines how many frames the victim will be held in place before knockback is applied. When negative this value is automatically calculated.
hitstopMultiplier Float 1.0 Multiplier that affects both hitstop and selfHitstop.
hitstopNudgeMultiplier Float 1 Multiplier for how far foes can nudge while in hitstop.
hitstopOffset Int 0 Used in conjunction with a negative hitstop stat, adds a flat amount of hitstop independent of how hitstop is calculated.
hitstun Int -1 How long the foe will be unable to attack after knockback is applied. When positive, this is the number of frames the foe will remain in hitstun. When negative, this works like a multiplier against the automatically calculated hitstun value. For example, a value of -0.5 would result in a multiplier of 0.5 against the calculated hitstun. By leaving it at its default of -1, you will get 100% of the calculated hitstun.
index Int -1 The numerical index of the hitbox that can be used to identify which hitbox was involved in a hit.
jabResetType Int null Allows the Hitbox to be armored by launch resistance or heavy armor.
knockbackCap Float -1 When greater than or equal to zero, prevents an attack from dealing more knockback than this value. When negative, knockback is unlimited.
knockbackGrowth Float 0 Growth of the power correlated to damage.
limb Int null What the attacker is attacking with.
@see AttackLimb
maxChargeDamageMultiplier Float null Multiplier used for maximum charge if the move is chargeable
metadata Dynamic null Additional metadata.
owner GameObject null The GameObjectApi instance that owns the hitbox.
rawAngle Float 0 The raw angle value of the hitbox that always starts equal to the "angle" stat. Cannot be assigned, but you can use it to determine the original angle of the hitbox in cases where the actual trajectory of the foe isn't desired.
rawDamage Float 0 The raw damage value of the hitbox. Is unaffected by staling and cannot be assigned.
reflectable Bool false When true, the hitbox is able to trigger reflect-related events when it connects with a reflect box. Reflect events are only receivable by projectiles and items, and the resulting behavior is determined by the individual object receiving the reflect event.
reverse Bool false When true, the hitbox will automatically reverse and flip most other object types objects upon a successful hit.
reversibleAngle Bool true When true, if the hitbox connects behind the origin of the attacker then the resulting angle will be flipped horizontally.
selfHitstop Int -1 Determines how many frames the attacker will be held in place before knockback is applied. When negative this value is automatically calculated.
selfHitstopOffset Int 0 Used in conjunction with a negative selfHitstop stat, adds a flat amount of hitstop independent of how selfHitstop is calculated.
shieldDamageMultiplier Float 1 Multiplier for shield damage.
shieldable Bool true When true, the hitbox is able to be shielded by foes.
shieldstunMultiplier Float 1 Multiplier for shieldstun.
stackKnockback Bool true Setting to false will disable knockback stacking.
tumbleType Int null Tumble settings
@see TumbleType

Instance Functions

Function Name Description
afterImportJSON(data:Dynamic):Void
updateMetadata(data:Dynamic):Void Utility function for updating the metadata object of the stats without changing the metadata object's reference. Performs a shallow merge of all fields from the input data
Parameters:
- data - The data to merge into the metadata