• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML layer_id

M

MIkadini

Guest
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