Hitbox Grid Indexes
These values affect the properties of a specific hitbox. Using these indexes to set values will only apply the values once the hitbox is created. To change the properties of a hitbox after it has been created, you will have to manually edit the variables of the pHitBox object (noted in the pHitBox Variable column).
Core Properties[edit | edit source]
Index | pHitBox Variable | Description |
---|---|---|
HG_PARENT_HITBOX
|
If HG_PARENT_HITBOX is anything other than 0 , then it will inherit all values from the specified hitbox for all properties except the following:
HG_HITBOX_TYPE HG_WINDOW HG_WINDOW_CREATION_FRAME HG_LIFETIME HG_HITBOX_X HG_HITBOX_Y HG_HITBOX_GROUP | |
HG_HITBOX_TYPE
|
type
|
|
HG_WINDOW
|
The attack window in which the hitbox is created | |
HG_WINDOW_CREATION_FRAME
|
The frame in which the hitbox is created, relative to the start of the attack window | |
HG_LIFETIME
|
length
|
The duration of the hitbox, in frames |
HG_HITBOX_X
|
x_pos
|
The x position of the center of the hitbox, relative to the center of the player |
HG_HITBOX_Y
|
y_pos
|
The y position of the center of the hitbox, relative to the bottom of the player |
HG_WIDTH
|
image_xscale*200
|
The width of the hitbox, in pixels |
HG_HEIGHT
|
image_yscale*200
|
The height of the hitbox, in pixels |
HG_SHAPE
|
sprite_index
|
|
Gameplay Properties[edit | edit source]
Index | pHitBox Variable | Description |
---|---|---|
HG_HITBOX_GROUP
|
hbox_group
|
Only one hitbox per group can hit an opponent until the attack ends. This can be overwritten by calling attack_end() → to manually reset all hitbox group flags. Hitboxes in group -1 can always hit an opponent. Projectiles always belong to group -1 .
|
HG_PRIORITY
|
hit_priority
|
Ranges from 1 to 10 , with a priority 10 hitbox taking priority over a priority 1 hitbox if both hit at the same time. If a hitbox has priority 0 , it can only hit projectiles and will appear gray in when hitboxes are visible.
|
HG_DAMAGE
|
damage
|
The damage dealt by the hitbox |
HG_ANGLE
|
kb_angle
|
The angle at which the hitbox sends opponents. 0 is straight horizontally forward, 90 is upward, 270 is downward. A value of 361 will send at 45 for aerial opponents and 40 for grounded opponents. Can be overwritten or modified by HG_ANGLE_FLIPPER
|
HG_ANGLE_FLIPPER
|
hit_flipper
|
Alters the angle of knockback
|
HG_BASE_KNOCKBACK
|
kb_value
|
The amount of knockback the move applies to an opponent regardless of their damage |
HG_KNOCKBACK_SCALING
|
kb_scale
|
The amount of knockback to add to HG_BASE_KNOCKBACK relative to the opponent’s damage
|
HG_FINAL_BASE_KNOCKBACK
|
bkb_final
|
If this is greater than 0 , the base knockback of the hitbox will progress linearly from HG_BASE_KNOCKBACK to HG_FINAL_BASE_KNOCKBACK over the span of the hitbox’s lifetime
|
HG_BASE_HITPAUSE
|
hitpause
|
The amount of hitpause the move applies to an opponent regardless of their damage |
HG_HITPAUSE_SCALING
|
hitpause_growth
|
The amount of hitpause to add to HG_BASE_HITPAUSE relative to the opponent’s damage
|
HG_EXTRA_HITPAUSE
|
extra_hitpause
|
Extra hitpause to apply to the opponent only. Negative values will reduce hitpause. |
HG_HITSTUN_MULTIPLIER
|
hitstun_factor
|
The value by which hitstun is multiplied after being calculated normally. A value of 0 results in default hitstun (the same as a value of 1 )
|
HG_DRIFT_MULTIPLIER
|
dumb_di_mult
|
Causes the acceleration of the opponent’s drift DI to be multiplied by this value |
HG_SDI_MULTIPLIER
|
sdi_mult-1
|
Causes the distance of the opponent’s SDI to be multiplied by this value |
HG_TECHABLE
|
can_tech
|
0 = Can tech (default)
|
HG_FORCE_FLINCH
|
force_flinch
|
0 = Does not force flinch (default)
|
HG_EFFECT
|
effect
|
Applies basecast effects on hit
|
HG_GROUNDEDNESS
|
groundedness
|
|
HG_IGNORES_PROJECTILES
|
proj_break
|
|
HG_HIT_LOCKOUT
|
no_other_hit
|
The number of frames after this hitbox connects where another hitbox belonging to the same player cannot hit the opponent |
HG_THROWS_ROCK
|
throws_rock
|
|
HG_EXTENDED_PARRY_STUN
|
|
Aesthetic Properties[edit | edit source]
Index | pHitBox Variable | Description |
---|---|---|
HG_VISUAL_EFFECT
|
hit_effect
|
The index of the visual effect that is spawned when the hitbox connects |
HG_VISUAL_EFFECT_X_OFFSET
|
hit_effect_x
|
Normally, the visual effect is created between the center of the hitbox and the opponent’s position. The value here adds an offset to the center of the hitbox in that calculation |
HG_VISUAL_EFFECT_Y_OFFSET
|
hit_effect_y
|
Normally, the visual effect is created between the center of the hitbox and the opponent’s position. The value here adds an offset to the center of the hitbox in that calculation |
HG_VISUAL_EFFECT_DISTANCE
|
hit_effect_lerp
|
Appears unused. Would be used to change the value the game uses to lerp between the center of the hitbox and the opponent's position, but it does not seem to work. |
HG_HIT_PARTICLE_NUM
|
fx_particles
|
The hit particle slot to use. Should be between 1 and 6 for custom particles. A value of 0 will use normal hit particles.
|
HG_HIT_SFX
|
sound_effect
|
The index of the sound effect to play when the attack hits. |
HG_EXTRA_CAMERA_SHAKE
|
camera_shake
|
|
Projectile Properties[edit | edit source]
These values only affect the hitbox if the HG_HITBOX_TYPE
property is 2
.
Index | pHitBox Variable | Description |
---|---|---|
HG_PROJECTILE_SPRITE
|
sprite_index
|
The index of the sprite to loop for the projectile’s animation |
HG_PROJECTILE_MASK
|
mask_index
|
The index of the sprite to use for the projectile’s collision (uses precise collision). Set to -1 to use normal hitbox collision with HG_SHAPE .
|
HG_PROJECTILE_COLLISION_SPRITE
|
collision_sprite
|
The index of the sprite used for colliding with terrain only. Defaults to 0 , in which case it will use the sprite_index instead.
|
HG_PROJECTILE_ANIM_SPEED
|
img_spd
|
The speed at which the projectile’s sprite will animate. Recommended to use values between 0 and 1 , with 1 being 1 image per frame.
|
HG_PROJECTILE_HSPEED
|
hsp
|
The initial horizontal speed of the projectile in pixels per frame |
HG_PROJECTILE_VSPEED
|
vsp
|
The initial vertical speed of the projectile in pixels per frame |
HG_PROJECTILE_GRAVITY
|
grav
|
The downward acceleration applied to the projectile every frame |
HG_PROJECTILE_GROUND_FRICTION
|
frict
|
The decrease in horizontal speed per frame when the projectile is grounded |
HG_PROJECTILE_AIR_FRICTION
|
air_friction
|
The decrease in horizontal speed per frame when the projectile is aerial |
HG_PROJECTILE_WALL_BEHAVIOR
|
walls
|
|
HG_PROJECTILE_GROUND_BEHAVIOR
|
grounds
|
Behavior will also apply to collisions with ceilings. |
HG_PROJECTILE_ENEMY_BEHAVIOR
|
enemies
|
|
HG_PROJECTILE_LIFESPAN
|
|
Appears unused. Changing this variable does not affect the lifetime, HG_LIFETIME does.
|
HG_PROJECTILE_PARRY_STUN
|
projectile_parry_stun
|
|
HG_PROJECTILE_DOES_NOT_REFLECT
|
does_not_reflect
|
|
HG_PROJECTILE_IS_TRANSCENDENT
|
transcendent
|
|
HG_PROJECTILE_DESTROY_EFFECT
|
destroy_fx
|
The index of the visual effect to use when the projectile is destroyed. |
HG_PROJECTILE_PLASMA_SAFE
|
plasma_safe
|
|
HG_PROJECTILE_UNBASHABLE
|
unbashable
|
|
Integer Values[edit | edit source]
In reality, the labels for these grid indexes are arbitrary: each is a macro which returns an integer value. Only values 0 - 99 are valid hitbox data indexes. Some do not have macros assigned to them, but can still be used via the integer value itself to store additional hitbox data.
0 - HG_PARENT_HITBOX 1 - HG_HITBOX_TYPE 2 - HG_WINDOW 3 - HG_WINDOW_CREATION_FRAME 4 - HG_LIFETIME 5 - HG_HITBOX_X 6 - HG_HITBOX_Y 7 - HG_WIDTH 8 - HG_HEIGHT 9 - HG_SHAPE 10 - HG_PRIORITY 11 - HG_DAMAGE 12 - HG_ANGLE 13 - HG_BASE_KNOCKBACK 14 - HG_KNOCKBACK_SCALING 15 - HG_EFFECT 16 - HG_BASE_HITPAUSE 17 - HG_HITPAUSE_SCALING 18 - HG_VISUAL_EFFECT 19 - HG_VISUAL_EFFECT_X_OFFSET |
20 - HG_VISUAL_EFFECT_Y_OFFSET 21 - HG_HIT_SFX 22 - HG_ANGLE_FLIPPER 23 - HG_EXTRA_HITPAUSE 24 - HG_GROUNDEDNESS 25 - HG_EXTRA_CAMERA_SHAKE 26 - HG_IGNORES_PROJECTILES 27 - HG_HIT_LOCKOUT 28 - HG_EXTENDED_PARRY_STUN 29 - HG_HITBOX_GROUP 30 - HG_HITSTUN_MULTIPLIER 31 - HG_DRIFT_MULTIPLIER 32 - HG_SDI_MULTIPLIER 33 - HG_TECHABLE 34 - HG_FORCE_FLINCH 35 - HG_FINAL_BASE_KNOCKBACK 36 - HG_THROWS_ROCK 37 - HG_PROJECTILE_SPRITE 38 - HG_PROJECTILE_MASK 39 - HG_PROJECTILE_ANIM_SPEED |
40 - HG_PROJECTILE_UNBASHABLE 41 - 42 - HG_PROJECTILE_HSPEED 43 - HG_PROJECTILE_VSPEED 44 - HG_PROJECTILE_GRAVITY 45 - HG_PROJECTILE_GROUND_FRICTION 46 - HG_PROJECTILE_AIR_FRICTION 47 - HG_PROJECTILE_WALL_BEHAVIOR 48 - HG_PROJECTILE_GROUND_BEHAVIOR 49 - HG_PROJECTILE_ENEMY_BEHAVIOR 50 - HG_PROJECTILE_LIFESPAN (unused) 51 - HG_PROJECTILE_PARRY_STUN 52 - HG_PROJECTILE_DOES_NOT_REFLECT 53 - HG_PROJECTILE_IS_TRANSCENDENT 54 - HG_PROJECTILE_DESTROY_EFFECT 55 - HG_PROJECTILE_PLASMA_SAFE 56 - HG_PROJECTILE_COLLISION_SPRITE 57 - HG_HIT_PARTICLE_NUM 58 - HG_VISUAL_EFFECT_DISTANCE (unused) |