Spawner spawns 2 actors instead of 1?

TitanFuryTitanFury Member Posts: 55
edited May 2015 in Working with GS (Mac)

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

  • MantoManto Member Posts: 796

    @TitanHimself said:
    Don't know if this matters but the spawner picks a random actor to spawn out of two possibilities.

    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).

  • TitanFuryTitanFury Member Posts: 55

    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

  • TitanFuryTitanFury Member Posts: 55

    @Manto said:
    Sounds like it could be randomly spawning either 1 actor or both (instead of one of the two).

    The spawner is actually spawning the same actor of the two twice, not both.

  • TitanFuryTitanFury Member Posts: 55

    After some moving everything around a bit, I managed to fix it! Thanks for the help Manto, I appreciate it :)

Sign In or Register to comment.