Hi Guys,
I tried to create persistent instance from certain object and store it in global variables, so that i can access it across rooms. I deactivated the instance each time i created it. So when i changed room, looks like i'm facing issue to find the instance. Here the snippet of the code:
ds_list_add(global.player_list,instance_create_depth(0, 0, 999, object));
global.player_list[|(ds_list_size(global.player_list)-1)].persistent = true;
instance_deactivate_object(global.player_list[|ds_list_size(global.player_list)-1]);
When i changed room and try to access object parameter in global.player_list, i'm facing error (unable to find instance with object index ...) . This is how i access the object parameter:
global.player_list[|0].parameter
Any idea?
Thanks in advance.
I tried to create persistent instance from certain object and store it in global variables, so that i can access it across rooms. I deactivated the instance each time i created it. So when i changed room, looks like i'm facing issue to find the instance. Here the snippet of the code:
ds_list_add(global.player_list,instance_create_depth(0, 0, 999, object));
global.player_list[|(ds_list_size(global.player_list)-1)].persistent = true;
instance_deactivate_object(global.player_list[|ds_list_size(global.player_list)-1]);
When i changed room and try to access object parameter in global.player_list, i'm facing error (unable to find instance with object index ...) . This is how i access the object parameter:
global.player_list[|0].parameter
Any idea?
Thanks in advance.