Hit Effects

Hit effects are animations that play in a specific position for a set amount of time. The game has many built-in visual effects, but you can also create your own.


You can create an effect from a custom sprite using

hit_fx_create( sprite_index, animation_length )  Reference→

and then either assign it to the hitbox grid by calling

set_hitbox_value( attack, hitbox, index, value )  Reference→

or manually spawn it:

spawn_hit_fx( x, y, hit_fx_index )  Reference→


You can also access the hit_fx_object directly to change the following variables:

Variable Description
hit_fx The index of the hit effect.
pause_timer Set to 0 to pause the effect
pause The amount of frames to pause when you set pause_timer to 0
draw_angle The angle at which to draw the effect
spr_dir The direction the effect is facing
1 = right
-1 = left