Spawning Multiple Objects

Hi,
I have set up a spawning feature in my game and it works great but as the levels progress I want more beach balls to fall sooner. Ex. one ball is spawned then soon after that another is spawned so it more are falling to make it tougher and not just one...then another...then another etc.

Here's a part of the code that makes multiple objects fall but there's a problem with it...

1
timer.performWithDelay( 100, spawnBall, 2 )

Achoo! Oops :P do you think I'm going to have to rework the entire code?

Hi Danny,

Sounds like you're trying to remove something you've already removed.

Also, with the ball spawning, you're spawning them inside each other I think - maybe you should adjust where they spawn slightly? (As in side by side or the like?)

Peach :)

Hey Peach,
When I try to spawn more than on object at a time then yes I am trying to remove more than one object and that is the problem.
Also, deeper in the code, I have them randomly appearing at different points on the screen.

Erm, just had a thought - how are you spawning them? Do they both have the same name?

For trying to remove more than one object, that shouldn't be an issue - the only issue I can think of is if you're naming them both "ball" or the like. Is that the case?

Peach :)

views:1348 update:2011/12/1 20:56:45
corona forums © 2003-2011