• 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!

GameMaker [SOLVED] Issue with instance_activate_layer()

  • Thread starter Jordan Robinson
  • Start date
J

Jordan Robinson

Guest
I am trying to deactivate all instances in the game except for those on the "Controllers" layer:

Code:
instance_deactivate_all(true);
instance_activate_layer("Controllers");

All the instances are deactivated correctly, however the layer I want re-activated is not. If I individually activate the instances I want using instance_activate_object() it works fine...

Am I misunderstanding the use of instance_activate_layer()? My implementation appears to fit the description in the documentation

[EDIT - SOLUTION]

I didn't realise that my persistent objects in the "Controller" layer will not move automatically to the "Controller" layer in the next room. Resetting their layers in the room_start event solved the issue.
 
Last edited by a moderator:
Top