How do I Create Smart Spawner System

Get help using Construct 2

Post » Thu Mar 02, 2017 10:29 am

Hi everyone

I have been tinkering with spawn event system for a while yet found a best solution for my situation. Maybe experts here have some suggestion / idea / workaround for the problem i had come into.

Situation:
- I have 5 different enemies.
- I have 5 spawner (spawn point)

What i try to achieve:
1. Randomly choose 5 different enemies to randomly spawn at 4 different spawner only, at the same time.
2. For every #seconds, randomly choose 5 different enemies to spawn at 2 different spawner only.
3. Randomly spawn 5 different enemies at 5 different spawner, but never a spawner spawn at same time.
4. Controlling which enemies can be spawn at 5 different spawner (such as, an event / trigger point / control).

(I hope this is not too much. But if it is just focus on the number one. Thanks guys)

What have i tried:
Image

By creating group, i can make it enable/disable triggered and spawned enemies, but, at some point, enemies will spawn at 5 different spawner at the same time, which i don't really want. Its kind a hard to figure which event should be put into.

Can you guys sheds some light.

*Sorry if my english bad. Do ask if need clarification.
B
2
Posts: 3
Reputation: 158

Post » Thu Mar 02, 2017 8:29 pm

This is (kinda sorta) every possible spawn combination in 1 capx.

https://www.dropbox.com/s/wb2408wf6vmuv ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Mar 02, 2017 10:11 pm

You can randomize your time after each spawn which would give less chance of duplication.

Use a global variable for SpawnTime instead of every 5 seconds and randomize that after each spawn.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Mon Mar 06, 2017 11:02 am

99Instances2Go wrote:This is (kinda sorta) every possible spawn combination in 1 capx.

https://www.dropbox.com/s/wb2408wf6vmuv ... .capx?dl=0

Thanks, will definitely look into it.
B
2
Posts: 3
Reputation: 158

Post » Mon Mar 06, 2017 11:17 am

lamar wrote:You can randomize your time after each spawn which would give less chance of duplication.

Use a global variable for SpawnTime instead of every 5 seconds and randomize that after each spawn.

I think your suggestion will fit perfectly for Q no 3, but i'm a little bit lost here.

You mean that:
- I create global variable for SpawnTime.
- Randomize after each spawn (that will refer to SpawnTime) is this correct?

If so, (sorry for noob question) what type and value should i put for SpawnTime?
B
2
Posts: 3
Reputation: 158

Post » Mon Mar 06, 2017 11:29 am

Kazuma wrote:
lamar wrote:You can randomize your time after each spawn which would give less chance of duplication.

Use a global variable for SpawnTime instead of every 5 seconds and randomize that after each spawn.

I think your suggestion will fit perfectly for Q no 3, but i'm a little bit lost here.

You mean that:
- I create global variable for SpawnTime.
- Randomize after each spawn (that will refer to SpawnTime) is this correct?

If so, (sorry for noob question) what type and value should i put for SpawnTime?


Yes- use a global variable for your spawn time instead of a set 5 second interval and randomize it at the first of the event and in each sub event following. That should reduce any duplication.

There may still be an occasional duplication but it would be very rare.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, dop2000 and 46 guests

cron