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
33
S
17
G
11
Posts: 350
Reputation: 8,695

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: ditocruz and 17 guests