SOLVED Access instances from another room?

Neptune

Member
Is this possible? It seems like it would be, but I can't seem to get it to work...
GML:
layer_set_target_room(not_current_room);

    var elements = layer_get_all_elements("Instances");
    for (var i = 0; i < array_length(elements); i++)
    {
        var node_inst =  layer_instance_get_instance(elements[i]);
        with(node_inst)
        {
               //assess creation code
        }
    }
    elements = noone;
                                                     
layer_reset_target_room();
[EDIT]
Hmmm it returns a real instance ID, but the instance doesnt actually exist so it seems . access and with() wont work šŸ¤”
variable_instance_get returns undefined

So close, but I think it's a no-go šŸ˜­
 
Last edited:
Top