GML layer_id

MIkadini

Member
I see in the Space Rock tutorial that for create the parallax effect i must use layer_xy, but if i go in the documentation i see that if i use directly the layer name ther's an impact on the performance, how can i use find the layer id? for save at the room start in an array for example?
 

TheouAegis

Member
layer_get_id()

If the space rocks tutorial is done similarly to the platformer tutorial, what you are seeing is not the name of the layer, you are seeing a variable which happens to be the same as the name of the layer.

Instances = layer_get_id("Instances")
 
Top