W
Wayfarer
Guest
I have a script which refers to the array "global.grid" quite a bit, so I've made it a local variable like so:
Now, I notice if I do the following...
...that correctly show the "!!!" in the first cell.
However, if I do...
...it still shows the original array. Is the array still existing because it's referenced by the local "grid" variable? Shouldn't setting it to 0 free the array?
I'm making this post because I want to ensure by creating a local variable I'm not constantly making a copy of the array each step.
Code:
var grid = global.grid;
Code:
var grid = global.grid;
global.grid[0, 0] = "!!!";
show_message(grid);
However, if I do...
Code:
var grid = global.grid;
global.grid = 0;
show_message(grid);
I'm making this post because I want to ensure by creating a local variable I'm not constantly making a copy of the array each step.