spawn_hit_fx

Spawns a visual effect at the specified position.

ArgumentTypeDescription
x:realThe x position to spawn effect at
y:realThe y position to spawn effect at
hit_fx_index:realThe ID of a built-in visual effect or a custom effect previously created with hit_fx_create( sprite_index, animation_length ) Reference→

Example, called from update.gml:

// spawns a visual effect at the beginning of 4th Fspecial window:
if (attack == AT_FSPECIAL && window == 4 && window_timer == 1) {
spawn_hit_fx( x, y, my_custom_hit_fx );
}