Argument Description index The index of the sprite to check.
This function returns whether a sprite with the specified index exists or not. Please note, that the value used for checking must have been initialised previously or else you will get an error causing GameMaker Studio 2: Studio to close.
sprite_index = spr_array;
sprite_index = spr_BaseSprite;
The above code checks an array to see if it contains a valid sprite index and if so it assigns that sprite to the instance, but if not, it assigns a sprite from the included resources.