How to create my spawner system with less events?

Get help using Construct 2

Post » Wed Nov 07, 2012 12:23 am

Hey, wow, I post a lot here don't I? Anyways, I'm working on another game right now, and I do plan on buying the full version of Construct 2 within the next month or so. Until then, I'm working with the limited 100 events.

I have a spawn system, which basically creates a wave based on a global variable number. Each wave has exactly the same events, but with a different "every x number of seconds" variable.

Is there a way I can condense this into fewer events?

Project file download.

Image example:
darkpivot2012-11-07 00:28:51
B
19
S
4
G
1
Posts: 42
Reputation: 1,793

Post » Wed Nov 07, 2012 6:15 am

Instead of using 3 and 5 in Random(3,5), use two global variables and just set them depending on the level.
B
79
S
24
G
54
Posts: 4,743
Reputation: 40,749

Post » Wed Nov 07, 2012 6:48 am

you could merge the top two events into one:

+every second
     >add 1 to systemtime
     >set wavetype to ceil(systemtime/25)

Also you could merge all the enemy objects into just one object, with different animations, and a variable 'type' which makes them act differently.

That way you could just do:

+pick a random spawner instance
     ->spawn enemy
     ->set enemy.type to spawner.spawnnumberkeepee2012-11-07 06:49:35
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Wed Nov 07, 2012 3:12 pm

Good ideas! I'll try them out when I get home, thanks!
B
19
S
4
G
1
Posts: 42
Reputation: 1,793

Post » Sun Jun 02, 2013 12:15 am

Uhn. This topic is too old but I have one question.

How did you make a variable without value/<varies>? Your spawn system helped me a lot but I can't create a variable without value.
B
3
Posts: 8
Reputation: 191


Return to How do I....?

Who is online

Users browsing this forum: Aserak2012, ManuelPerez and 20 guests