Sprite get

Gets a sprite from the item's sprites folder (sprites/articles when called from a stage.)

Syntax
sprite_get( sprite );

Returns
real (sprite index)

Basic
//Draws the sprite "my_sprite" at the player's x and y. draw_sprite( sprite_get("my_sprite"), 0, x, y);

Advanced
//init.gml //Store the sprite in a variable to use later (this is slightly more performant) spr_mysprite = sprite_get("my_sprite");

//draw_hud.gml //Draw the sprite to the hud. draw_sprite( spr_mysprite, 0, temp_x, temp_y );