Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | leefinn | |
Old Version | Published before Godot 3 was released. |
Hi,
I have an array that needs to be randomized, and after “x” is called I want to remove it from the array. How can I do this?
Thanks
Do you want to pick and remove a random item out of a randomized array?
Or do you just grab and remove the first or last item of a randomized array?
I would recommend you to do the later, because then you could use Array.pop_*()
.
In the first case you could use Array.erase(val)
atze | 2016-04-08 22:02