Good Day,
I’m looking for a way to spawn a limited number of a certain type of enemy.
Current example:
I have to spawn 10 green orbs and then make 3 of them turn red and 1 of them turn purple at the start of the game. The position on the screen will remain the same but the purple/red orbs will replace the green ones.
I’m trying to figure out how to make only 1 purple 3 red and the rest green among all enemy spawners
With this bp it spawn randomly green purple or red but i can’t decide how many for each type(surely the random integer in range is not the correct solution since it gives a random value between the 3).
It spawns a random item because it is what you are asking it with our random item in range.
Why don’t you add an parameter to your ‘SpawnItem’ fonction allowing to pass it the kind of item to pick in the array ?
Thanks for the welcome!
However the problem is that spawnitem is a function of 1 sphere, so I can’t put a counter here, I don’t know how to create it in such a way that at the start of the game it limits the number of purple actors to 1 and the red ones to 3
We’d need to know more regarding where you’re taking this and how expandable it needs to be in order to suggest something a bit more maintenance friendly and modular.