Time triggered monster spawn

Get help using Construct 2

Post » Tue Feb 21, 2012 12:35 pm

Hi guys,

I am creating a topdown highscore shooter. I am a complete noob so sorry if my question is a bit stupid.

But i want certain monsters to spawn at for example 10 seconds and after that spawn every 4 seconds.

What i now have is this:
system, time = 10 seconds => system, create object on layer 1 at (100,100)
system, every 4 seconds => system, create object on layer 1 at (100,100)

I think my question is easy to solve for you guys, so help would be greatly appreciated.

greetings
Brent
B
5
Posts: 20
Reputation: 640

Post » Tue Feb 21, 2012 12:39 pm

You want to spawn first monster for 10 seconds or after 10 seconds have passed?
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Feb 21, 2012 12:42 pm

Thank you for your fast reply.

After 10 seconds have passed i want the monster to spawn. And after the 10 seconds the monster should spawn every 4 seconds.

I hope this explains it.
B
5
Posts: 20
Reputation: 640

Post » Tue Feb 21, 2012 2:28 pm

You could use a variable to check if the first enemy has spawned.

Example: Spawntime_Example.capx
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Tue Feb 21, 2012 3:00 pm

Thank you Nimitrix! Taht was exactly what i needed! You couldn't have helped more!

I can give the events to another monster if i add another global variable named "second_spawn" and give it the same events only with a new sprite?

I only have one question left. The monster that spawns at 10 seconds is already on the stage and moves to the player, is there a way i can delete him?

Thank you so much!
B
5
Posts: 20
Reputation: 640

Post » Tue Feb 21, 2012 5:03 pm

No problem, I'm not sure if I understand your last question though.

I recommend using an invisible sprite as a spawn point. You do, however, need an instance of the monster sprite in your project, so you can just put a monster sprite on the outside of your layout. (like I did with the "enemy" sprite in the example)

If that didn't answer your question, maybe you could to add an event that does something like this?

System, On start of layout => Destroy monster sprite
B
27
S
8
G
8
Posts: 903
Reputation: 8,452


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 14 guests