layer_get_all


Description

This function will return an array populated with the unique ID values of each layer in the room.


Syntax:

layer_get_all()


Returns:

Array (1D, populated with Layer IDs)


Example:

var a = layer_get_all();
for (var i = 0; i < array_length_1d(a); i++;)
   {
   layer_destroy(a[i]);
   }

The above code retrieves all the layers in a room and adds thei rID values to an array. This array is then parsed to destroy or the room layers.


Back: General Layer Functions
next: layer_get_all_elements
© Copyright YoYo Games Ltd. 2018 All Rights Reserved