background_assign

Assigns one background to another background index.

Syntax:

background_assign(index, background);


Argument Description
index The index of the background to be copied to (ie: over-written).
background The background to be copied from.


Returns: N/A


Description

This function takes two previously created (or included) background indices, and copies the image from one to the other. In this way you can copy (or "clone") one background into another index. Note that you can only assign to a background that has been created dynamically using the background_duplicate() function.


Example:

bck_temp = background_duplicate(bck_Sky_Base);
background_assign(bck_Temp, bck_Sky);

The above code will copy the image from "bck_Sky" into the index of "bck_Temp".


Back: Sprites
Next: background_create_colour
© Copyright YoYo Games Ltd. 2018 All Rights Reserved