I read the help docs and see that I can assign a different sprite to sprite_index via code. Why is it called sprite_index? When I see index, I think [0], [1]. [2]. But I do not see code/examples moving through an array. Also, I didn't understand "using a variable that has an externally loaded sprite indexed in it". I'm a newbie, haven't coded in about 15 years but enjoying GMS2. Sure beats all those "productivity apps" I did for a living.
Hi and welcome to the GMC!
This is a good question.
Variables in GameMaker:Studio 2 can only hold values that are either a number, a string, an array, an enum, a boolean or undefined (ignoring pointers, which are only used to support certain extensions).
Variables thus cannot hold sprites as values.
To refer to a sprite, we need some reference that can be encoded in one of the above data types.
GameMaker encodes references to sprites as numbers.
In GM:S, the number 0 refers to the first sprite in the resource tree of the project,
the number 1 refers to the second sprite in the resource tree, and so on.
You can understand a reference to a sprite as the index to the sprite in the resource tree.
The variable sprite_index holds such references as values.
With "externally loaded sprite", the documentation means that on top of the sprites in the resource tree of your project,
you can also load sprites from files at run time and sprite_index can refer to those as well (despite them not having a name in the resource tree).