Spawn multible object with delay

Get help using Construct 2

Post » Mon Sep 08, 2014 7:46 am

Hi

Got 20 of the same object and want to spawn object with delay
so they kind of shows up random

Is there a way for this

Flemming
B
34
S
18
G
11
Posts: 356
Reputation: 8,819

Post » Mon Sep 08, 2014 7:52 am

Global variable enemyCount 0
Global variable totalEnemies 20
System -> Every 2 seconds
---- System -> enemyCount less or equal to totalEnemies
-------- System -> Create object yourObjectHere
-------- System-> Add 1 to enemyCount

If you wanted a random delay, change to:

Global variable enemySpawnRate 1
System -> Every enemySpawnRate seconds
---- System -> enemyCount less or equal to totalEnemies
-------- System -> Create object yourObjectHere
-------- System-> Add 1 to enemyCount
-------- System -> Set enemySpawnRate to round (random(1,10))
Founder of Jadelight Studio, Developer of Libertas Aedifex, regular C2 Help contributor and fan of ambient music and Star Wars.
B
12
S
4
Posts: 255
Reputation: 2,008


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests