I'm getting the error:
On the following code:
Which is part of a script (setupStarMap) that is being called from another room, like this:
If I run this code on the create event of an object that I drag and drop on the room, it works, so the layer name is correct.
I assume this is caused by that code still running on the previous room, despite it being after the room_goto instruction. Is that correct? Shouldn't it change rooms before the next line? If that's the case, is there some way to specify running it on that room? Otherwise I need a new object just to run that code.
Code:
specified layer "LayerStars" does not exist
Code:
var star = instance_create_layer(starX, starY, "LayerStars", oStar);
Code:
room_goto(rStarMap);
setupStarMap();
I assume this is caused by that code still running on the previous room, despite it being after the room_goto instruction. Is that correct? Shouldn't it change rooms before the next line? If that's the case, is there some way to specify running it on that room? Otherwise I need a new object just to run that code.