I have an array of (spawned) actors and I would really really like to remove the actor from the game (actor -> destroy) AND also from the array.
Sounds easy, If there wasn’t the garbage collection maybe…
So, looping through the array -> cast to actor -> destroy actor works fine.
Looping afterwards again through the same indexes → array: remove index…well, works fine…for the first 5-9 out of 15 items than the message log shows the following warning: “LogArray:Warning: Attempted to remove an item from an invalid index from array myArray [10/15]!”
Who cares? I do, because the index isn’t really “invalid” - it still exists and a later array -> add will result in a new array length of 16
Help?
Help!!