Spawner Not Spawning Quickly Enough?

FallingBoxStudiosFallingBoxStudios Freelance Graphic DesignerMember Posts: 822
Hi, I'm trying to spawn the same ball actor over & over again to fall from the top of the screen to the bottom, but the only problem is that: one ball falls from the top of the screen, then by the time the ball goes out of the screen another one spawns again, so the balls fall down way to slowly.

The code in the ball actor:
Accelerate; Speed (random 100 - 300)
Direction; 270.

The code in the spawner actor:
Timer; - Every; (random 1 - 3) seconds
Spawn; Ball actor.

Is there anyway to speed it up? without it looking too crazy, basically I just want more then 1 ball to fall at a time. Thanks

- Hunter

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited November 2013
    Random on timers won't give you a random time every loop. If it picks 2 randomly then it will always spawn every 2 seconds, until you change scene/destroy the spawner actor.
  • FallingBoxStudiosFallingBoxStudios Freelance Graphic Designer Member Posts: 822
    @sadida172 That did not work :( it just made the balls fall down then go really slow at the end
  • CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
    if you want the balls to go directly down and stay same speed make it so instead of using an accelerate behavior or a velocity behavior use this;

    change attribute;
    self.motion.linearvelocity.y to (the speed you want) an example make it 300 maybe?

    this will make the balls fall and stay the same speed while falling, you can adjust the speed to separate balls or randomize the speed or whatever you want, but i always use this method for platformers or any games.
  • CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
    edited November 2013
    oh ok thought you meant the behavior
  • FallingBoxStudiosFallingBoxStudios Freelance Graphic Designer Member Posts: 822
    @CodeMonster @sadida172 Thanks, but this is not what I'm asking for :( never mind I think I found a way. Thanks :)
  • FallingBoxStudiosFallingBoxStudios Freelance Graphic Designer Member Posts: 822
    @KevinCross Oh okay then :-O Thanks :)
Sign In or Register to comment.