Help with Arrays
Hey guys, hope I can get some help with this.
I made this blueprint essentially to spawn enemies (actor blueprints) at certain locations. These locations are set using actors on the main level, then added to an Array. The Array is called to randomly get an actor from the Array's range, and spawn an enemy at that actor's location. This all works fine.
What I need help with is this: I want to call an actor from the Array at random, but then make it so that particular actor won't be called again until all of the other actors have been called randomly. Once all actors have been called, I'd like to "rinse and repeat", once again randomly calling actors from the Array and excluding them from further calls until the rest have all been called.
I hope what I'm asking makes sense. Cheers.
asked May 26 '15 at 12:45 PM in Blueprint Scripting
What I would do, is make 2 arrays.
One with what is left and one with what has been done.
As you pull one from an array, remove it from 1st array and ad it to the 2nd array.
When the 1st array is empty, refill it with the 2nd array and go again.
answered May 26 '15 at 12:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here