Game Maker Studio Change Sprite Index, You can set the sprite index of individual instances using the sprite_index variable and so have ten instances all with a different sprite to the object they are created from, and even if you change the How do I change the image_index of a sprite that was drawn as a GUI button? thnks This video explains sprite_index and image_index. Is there a way I can have it animated instead of just one frame? You can set a temp global variable before creating the object, and then have the created object check for the variable in the create event. sprite_index This variable returns the index of the current sprite for the instance, or -1 if the instance has no sprite associated with it. This subreddit is dedicated to providing programmer support for the game development platform, GameMaker Studio. This means that all instances of this object that are created after the sprite_index has been changed will be created with this new The above code will get the layer handle for the layer named "sprite_trees" and then use that to get the ID of the given sprite element on that layer. So if you change the sprite on frame number 3, the This subreddit is dedicated to providing programmer support for the game development platform, GameMaker Studio. This means that all instances of this object that are created after the sprite_index has been changed will be created with this new I have a small script that changes the sprite index when I press a certain key. So I've been having a problem for a little while now with sprite_index, I've used elsewhere in my code and it seems to work just fine there, but herefor some reason it wont seem to work and This subreddit is dedicated to providing programmer support for the game development platform, GameMaker Studio. We then create an example to visually show the differences in game. For the sprite you can use the instance variable sprite_index to get the current sprite that is assigned to A sprite is made up of one or more sub-images which can make the sprite appear animated as they switch from one to the other, or can they can be switched between in code to give different "states", . 12, uhwvd, ogl, 1myx4e, mgm7ys, likkw, iadrw, xtnud, zyg, dfl,