spawning enemies at random intervals and destroy.

Get help using Construct 2

Post » Mon Dec 02, 2013 2:09 am

Hello ,
I want to spawn an enemy every n seconds. So I have created a empty sprite and named it enemy spawn and ,created an event to spawn another object every 5 seconds. I am moving that object to left and if it crosses the left border I am deleting it .
But every 5 seconds , several of the enemies like 4 or 5 are being created.

How do I achieve enemy spawning and deleting them when they cross the viewportLeft(0).
Also , Before I have tried to create a container for enemyspawn called enemies. And I want to add an enemy when it is being created (But i cannot do it), so that i can loop through and find out which enemy has Enemy.x < 0 and destroy only it .

Posts: 5
Reputation: 485

Post » Mon Dec 02, 2013 2:45 am

Set the behaviour "Destroy Outside Layout" on the enemy, that handles delete outside layout.

Can you post a screenshot of the events you're using, or the capx file? It'll help the most in figuring out what is going wrong..
Made Cosmochoria -
Made Slayaway Camp -
Made Friday the 13th: Killer Puzzle -
Posts: 387
Reputation: 5,676

Post » Mon Dec 02, 2013 4:11 pm

how to attach an image here. It is not allowing me to add an url.
Posts: 5
Reputation: 485

Return to How do I....?

Who is online

Users browsing this forum: ChenBr, irina and 6 guests