background_get_width(index);
Argument | Description |
---|---|
index | The index of the background to find the width of. |
Returns: Real
With this function you can find the width of the base background
asset, with no transforms, in pixels.
if background_width[0] !=
background_get_width(background_index[0])
{
background_width[0] =
background_get_width(background_index[0]);
}
The above code checks the width of the background as it is in the current room and if there is a difference between that and the original base background, it resets the width.