Draws a sprite at a given position, and tiles it to fill the entire view.


GML Code Example

draw_sprite_tiled(sprite, subimg, x, y);

Argument Description
sprite The index of the sprite to draw.
subimg The subimg (frame) of the sprite to draw (image_index or -1 correlate to the current frame of animation in the object).
x The x coordinate of where to draw the sprite.
y The y coordinate of where to draw the sprite.

Returns: N/A


This function will take a sprite and then repeatedly tile it across the whole view (or room if no view is defined), starting from the coordinates that you give in the function. Tiling is based on the width and height of the sprite as defined by the sprite variables of the instance running the code.


GML Code Example

draw_sprite_tiled(sprite_index, image_index, x, y);

This will draw the instances assigned sprite (sprite_index) and its current frame of animation (image_index) at the instances own x and y position, and tiled horizontally and vertically across the view.

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here