GM: image single
From GMpedia.org Wiki
- The correct title of this article is image_single. It appears incorrectly here because of technical restrictions.
|
image_single | |
| Type: | variable |
| Globalism: | Local |
| Editable: | Yes |
The image_single local variable is the variable that defines (in a different way than image_index) the current subimage of the current selected sprite. A sprite in meaning is an graphic with multiple "sub-images", every sub-image in Game Maker has an index, starting from 0 (which is the main, first, image) and ending with whatever the user decides should the number of subimages be.
Since Game Maker 6.x, image_single is no longer documented in the help file, though can still be used in the program. The new variable for this is image_index.
A sprite of an object, by default is constantly moving, so whatever was the value set to if it was a positive integer less than the number of sub images, the sprite would keep animating. However, without the need for image_speed, setting image_index to -1 pauses the progression in the sprite's subimages while keeping the actual subimage of the object's sprite.

