sprite_get

Returns the unique index (real) of the sprite asset loaded from the /sprites folder.

ArgumentTypeDescription
sprite:stringThe name of the game asset to get the index of

Example, called from animation.gml:

if (state == PS_WALK) {
sprite_index = sprite_get( "dash" );
}