Okay, I know this a bone-brain simple query but how do I change just one element in an array ? I've checked all the refs and I couldn't find anything
that addressed this presumably very simple query.
I am working on a script that will let players search buildings for food and water. The idea is to record the last 20 buildings that the player has searched so that they don't just keep hanging around the same building until the food magically appears.
I created an array of arrays - 20 elements, all with a value of [0,0,0]. My script checks the nearest building position against each element of the array - if there is a match then the script exits, otherwise it is supposed to assign the position of that building as the "nth" searched building. When the index reaches 20 then it will reset back to zero so the player can go back to the same building at a later time.
I tried _array select _n = _newElement but that didn't work. I tried various brackets but still haven't had any luck.
Any ideas from anyone ?
HELP !
Roni