Odd bug with my map (though it could be in others I’m not sure.)
Ingame if you die and select the same spawn point you last spawned from, game will spawn you at spawn location index 0, regardless of what your last spawn actually was.
Selecting a different spawn point with a different index does not do this, unless you die again and select that same index. You can however spawn at one index, die and spawn at another, then select that first spawn index again and you will not come across this problem. So basically a player can’t spawn at the same location twice in a row (unless you just want to continually spawn at index 0.)
As additional information I have one spawn for each spawn index. 0-11.
For example :
Select spawn index 7. Spawn at index 7. Die. Select index 7 again. You will spawn at index 0 instead of 7
Select index 7. Die. Select index 8. Spawn at index 8. Die. Select index 7. Spawn at index 7. Die. ETC ETC ETC until you select the same index as last. In that case you will spawn at index 0 regardless of selection.
As that I don’t know if this problem is particular to me or to the game itself, it would be nice to know if anyone else has this issue, or if possibly everyone does. Thanks!
*It may be related to default spawn positions so I’ll look into that.
UPDATE
I removed index 0, and now if you select the same spawn index after you die you will spawn at index 9. Why 9 I have no idea.
Anytime your remove an index from an array, it will shift the other index’s above it down.
You may want to store the array you are handling in a temp array, then remove from the temp array, and compare the two after, to avoid shifting while parsing through an array.