When I have an array like this:
var grid = Array([1,1,1],[1,0,1],[1,1,1]);
And when you click(gamemap structure) on the 0 value it will be update to 1.
How do I update the whole array? So the array would be:
var grid = Array([1,1,1],[1,1,1],[1,1,1]);
I thought when you click the whole array will be checked and converse the 0 into 1.
I hope I’m clear enough and someone can help me to fix this problem.
Many thanks for your time!
Fr@nk
Just loop through all 9 of your items and build your array that way.
Instead of trying to selectively update one single item in the array, update all of the at the same time.