Spawner spawns 2 actors instead of 1?
TitanFury
Member Posts: 55
Hello!
So I'm testing my game out to see how it looks on my phone using the gamesalad viewer and the computer preview but the spawner which I have set to only spawn one actor decides to spawn 2. It doesn't do this consistently though, it's a random occurrence that it spawns 2 actors instead of 1.
To get into the "nitty gritty", I have two timers placed within each other:
After 5 seconds
Every 20 seconds, spawn actor
Don't know if this matters but the spawner picks a random actor to spawn out of two possibilities.
So how can I prevent the spawner from randomly spawning 2 actors instead of my assigned one?
Hopefully Iv'e made myself sufficiently clear Any help is greatly appreciated.
Cheers,
Andrei
Comments
What are the rules you use to pick one actor of the two? Sounds like it could be randomly spawning either 1 actor or both (instead of one of the two).
I use an integer attribute called "randomizer" which I change to a random number (1 or 2) each time the timer loops the 25 seconds. With this I have the rules:
When game.randomizer = 1
Spawn actor ball
When game.randomizer = 2
Spawn actor cube
The spawner is actually spawning the same actor of the two twice, not both.
After some moving everything around a bit, I managed to fix it! Thanks for the help Manto, I appreciate it