background_htiled

Variable that determines if a background should be tiled horizontally or not.

Syntax:

background_htiled[0...7];


Returns: Boolean


Description

By setting this variable array to true you can tell GameMaker: Studio to tile the background image for the selected background along the horizontal plane. This will make any moving backgrounds appear infinite, or simply repeat the same image over the width of the room if it is a static background. Setting this to false will disable tiling.


Example:

if background_htiled[0]
   {
   background_hspeed[0] = 2;
   }

The above code checks background0 to see if it is tiled horizontally, and if it is it then sets the horizontal scroll speed to 2.


Back: Backgrounds
Next: background_vtiled
© Copyright YoYo Games Ltd. 2018 All Rights Reserved