Thanks, dop2000 bro, that was amazing.
Two quick questions.
Question 1. In another scenario, I have an array of a certain height and width and data on it. How can I replace an index of the array? eg. Value of index 1 is "1" when Player collide with an object or by clicking a button I want set it something else, for eg. "23".
I don't want something like this. (Via)
Because my array would contain mostly numbers, the same value might be repeated on several indexes.
Question 2
How to make the addition of all the value from the array.
eg.
How do I calculate all the array value and store in on a global variable? For example here if we add all the numbers the value would be 20.