Jump to content

How can I make ground units spawn randomly but trigger based?


Recommended Posts

Posted

I had the idea to create a mission that would endlessly spawn moving ground units once a certain area was cleared.

 

E.g.: if red (or blue) forces are destroyed within a certain trigger area, this would activate a random new group, that would follow waypoints into the battle area.

 

To test this theory I thought I'd build a simple mission first, but unfortunately my idea stranded pretty soon :P

 

So, I've build this mission where 1 blue (immortal) infantry unit is attacked by 1 red (non immortal) infantry unit. The idea was to randomly spawn a next red unit, as soon as the first one dies. So I created two more red infantry units (named 2 and 3) with late activation tagged.

Now I stumbled upon two problems:

  1. As you can see in the attached screenshot, I'm not able to select an [or] action in the trigger menu.
  2. And even if I had an [or] option, how would I make sure it would randomly choose one of the units (I guess it would always spawn unit 2 as numerical this comes before 3)

 

Anyone able to help me out on this one?

Untitled.thumb.jpg.e1f2e1c9487f618440f3e6817e55f530.jpg

System specs:

 

i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU

HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3

 

~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH

Posted

I would use three triggers:

 

Switched Condition - All of Coalition Out of Zone (red, zone) - Flag 1 Set Random Value 1 .. 2

Once - Flag 1 Equals 1 - Group Activate Red Unit 2

Once - Flag 1 Equals 2 - Group Activate Red Unit 3

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted
I would use three triggers:

 

Switched Condition - All of Coalition Out of Zone (red, zone) - Flag 1 Set Random Value 1 .. 2

Once - Flag 1 Equals 1 - Group Activate Red Unit 2

Once - Flag 1 Equals 2 - Group Activate Red Unit 3

 

Thanks Rudel! :thumbup:

I'll try and play around with that

System specs:

 

i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU

HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3

 

~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH

Posted (edited)

Hmm.. I definitely see improvement, but somehow after a few random spawn "rounds", red forces stop spawning

 

My idea was to make them spawn randomly and endlessly.

 

Could someone please have a look at my test mission and give me some feedback? What am I missing here?

 

 

 

Edit:

The silly thing is, sometimes it gets to "spawn round" 2, sometimes to round 3, but then it stops. Tried numerous times and never reached round 4.

 

Edit2:

Is it possible that a flag number can only be used once? So if the random flag value 3 has been activated, it can't be activated again?

 

Edit3:

Could it be that an AI unit can only be spawned once? By now I tried all different kind of stuff in the trigger menu (repetitive, once, switched cond., 1 unit with 1 flag, 10 units with flag value 1-10, etc.). I'm pretty sure that when I started, with the mission I attached here, I saw some units re-spawn after they died in a previous round, but after 2 hours of struggling, I'm starting to doubt myself :( and honestly getting pretty close to pull out some of my hair :P

Endless spawn test.miz

Edited by sirrah

System specs:

 

i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU

HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3

 

~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH

Posted

You can't have infinite spawns without scripting. The best you can do is have a very large list of finite spawns. Once a group is spawned for the first time, it can't come back. Flag values can be reused.

 

 

Perhaps try this:

 

 

Flag set random value : use this to select a fixed order of spawns. Each order is non random, but which is selected is random, making it appear random when running the mission

 

 

If Flag value = 1 > Spawn group 5. Once 5 is dead spawn group 2, etc.

 

 

If Flag value = 2 > Spawn group 1. Once 1 is dead spawn group 4, etc.

 

 

You will have to set more triggers but I think this will give you what you want. It will also never "fail" because you will never try to call an already spawned group.

Awaiting: DCS F-15C

Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files

 

Posted
You can't have infinite spawns without scripting. The best you can do is have a very large list of finite spawns. Once a group is spawned for the first time, it can't come back. Flag values can be reused.

 

 

Perhaps try this:

 

 

Flag set random value : use this to select a fixed order of spawns. Each order is non random, but which is selected is random, making it appear random when running the mission

 

 

If Flag value = 1 > Spawn group 5. Once 5 is dead spawn group 2, etc.

 

 

If Flag value = 2 > Spawn group 1. Once 1 is dead spawn group 4, etc.

 

 

You will have to set more triggers but I think this will give you what you want. It will also never "fail" because you will never try to call an already spawned group.

Thanks for the reply Exorcet

Although your suggestion is really appreciated, achieving a true feeling of randomness would be a massive amount of work. Maybe I'd better start learning some basic scripting :book:

System specs:

 

i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU

HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3

 

~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...