The same goes for the sub-image, as this can also be set to the instance variable image_index which will set the sub-image to that selected for the current instance sprite (note, that you can draw a different sprite and still use the sub-image value for the current instance), or you can use any other value for this to draw a specific sub-image of the chosen sprite. For the sprite you can use the instance variable sprite_index to get the current sprite that is assigned to the instance running the code, or you can use any other sprite asset. This function draws the given sprite and sub-image at a position within the game room. ![]() ![]() The y coordinate of where to draw the sprite. The x coordinate of where to draw the sprite. ![]() The sub-image (frame) of the sprite to draw (image_index or -1 correlate to the current frame of animation in the object). Syntax: draw_sprite(sprite, subimg, x, y)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |