draw_surface_tiled_ext

This function takes a surface and then repeatedly tiles it across the whole room, starting at the coordinates that you give in the function and with each tile scaled, colour blended and with the alpha that you define (these properties are the same as those used in draw_surface_ext).

NOTE When working with surfaces there is the possibility that they can cease to exist at any time due to them being stored in texture memory. You should ALWAYS check that a surface exists using surface_exists() before referencing them directly.

TIP How a surface appears depends on its contents, especially the alpha values inside the surface. A surface cleared with an alpha of 0 may appear different from a surface cleared with an alpha of 1, due to the way they blend with the background. Take care of this whenever you notice a difference in the way something renders on a custom surface as opposed to the application_surface.

 

Syntax:

draw_surface_tiled_ext(surface, x, y, xscale, yscale, col, alpha);

ArgumentTypeDescription
surfaceSurfaceThe surface to draw.
xRealThe x coordinate of where to draw the surface.
yRealThe y coordinate of where to draw the surface.
xscaleRealThe horizontal scaling of the surface.
yscaleRealThe vertical scaling of the surface.
colColourThe colour with which to blend the surface.
alphaRealThe alpha of the surface.

 

Returns:

N/A

 

Example:

draw_surface_tiled_ext(surf, x, y, 2, 2, c_red, 0.5);

This will draw the surface indexed in surf at the instance's own x and y position, double its stored size and tiled in every direction in the room, as well as blended with the colour red and partially transparent.