Hey.
Run in to a bit of a problem.
I have a bunch of objects that i add to an array.
Each of these objects know of their position in the array.
Each of these objects can remove themselves from the array with the slice command.
The problem is that their position in the array changes if someone below them removes themselves before they do.
Is there a way to solve this?
example would be great, was thinking something along the lines of hashtable, but couldent find one in the docs.
Speed is of importance. The objects are entities in a game im making, so looping through the entire array to find themselves is not an option.
thanks