Hit fx create

This function creates a visual effect from a sprite. The data of the visual effect is stored in memory until the object calling the function is unloaded, and thus should only be called once per effect.

Syntax
hit_fx_create( sprite_index, animation_length );

Returns
int (hit effect index)

Basic
// init.gml // creates a 20-frame custom hit fx and stores its index in a variable vfx_custom = hit_fx_create( sprite_get( "my_custom_vfx" ), 20 );

// uspecial.gml // assigns the custom effect as the hit fx for hitbox 1 of AT_USPECIAL set_hitbox_value( AT_USPECIAL, 1, HG_VISUAL_EFFECT, vfx_custom );