Jump to content

Recommended Posts

Posted

Hey All-

I'm trying to emulate a training server's  BVR type training scenario which has waves of bandits that attack blue (set routes which is fine).  What I'm trying to do is something similar. I have about 12 groups (actually 2 groups of the same type per wave) to choose from.  What I'd like to do is have the script randomize which aircraft type is next up to spawn.  Ex. Wave starts say, with two 2-ship groups of Flankers.  Once they're dead, next group will  randomly spawn in.  I am using MIST and can have each wave respawn automatically upon death but even with successive waves spaced out there runs a chance that a wave may respawn next to another one which is what I want to avoid.  I'm a novice at scripting so any help is appreciated!

Posted

Two possible methods attached, might be helpful if you want to mostly avoid Lua and do all design in ME. 

The first (central spawner) uses a central spawner that chooses a random template t1..t6 each time it receives a spawn request. The templates are each inside the trigger zones t1-t6, and you can edit them as you like, including routes. The spawner activates once at start, and then every time there are no more clones left (empty! is short-circuited into the spawner's spawn?)

The second (distributed spawns) uses six spawners 1-6 to spawn the enemy groups that are defined by placing the groups into the trigger zones. At the beginning of the mission, and when a spawned group is fully destroyed, the randomizer picks a spawner, and sends the appropriate message to cause that cloner to spawn its group.

Uses DML

-ch

Random Spawns - central spawner.miz Random Spawns - distributed spawner.miz

Posted
13 hours ago, cfrag said:

Two possible methods attached, might be helpful if you want to mostly avoid Lua and do all design in ME. 

The first (central spawner) uses a central spawner that chooses a random template t1..t6 each time it receives a spawn request. The templates are each inside the trigger zones t1-t6, and you can edit them as you like, including routes. The spawner activates once at start, and then every time there are no more clones left (empty! is short-circuited into the spawner's spawn?)

The second (distributed spawns) uses six spawners 1-6 to spawn the enemy groups that are defined by placing the groups into the trigger zones. At the beginning of the mission, and when a spawned group is fully destroyed, the randomizer picks a spawner, and sends the appropriate message to cause that cloner to spawn its group.

Uses DML

-ch

Random Spawns - central spawner.miz 119.15 kB · 2 downloads Random Spawns - distributed spawner.miz 123.92 kB · 1 download

Man this is awesome and basically what I was looking for.  I'm a novice when it comes to scripting (at best) and will take a bit for me to digest but this is a massive help.

Posted
On 8/13/2022 at 4:45 AM, cfrag said:

Two possible methods attached, might be helpful if you want to mostly avoid Lua and do all design in ME. 

The first (central spawner) uses a central spawner that chooses a random template t1..t6 each time it receives a spawn request. The templates are each inside the trigger zones t1-t6, and you can edit them as you like, including routes. The spawner activates once at start, and then every time there are no more clones left (empty! is short-circuited into the spawner's spawn?)

The second (distributed spawns) uses six spawners 1-6 to spawn the enemy groups that are defined by placing the groups into the trigger zones. At the beginning of the mission, and when a spawned group is fully destroyed, the randomizer picks a spawner, and sends the appropriate message to cause that cloner to spawn its group.

Uses DML

-ch

Random Spawns - central spawner.miz 119.15 kB · 5 downloads Random Spawns - distributed spawner.miz 123.92 kB · 5 downloads

Hey thanks again for sharing this.  Is there a way to run two random spawners simultaneously? I'm only dabbling in scripting and am not the most familiar and I tried to use MIST to run a supplementary spawn but it appears that MIST isn't compatible with this script.  In any case running two random spawns running simultaneously (from different parts of the map) would be most preferable. Thanks again...  

Posted (edited)
24 minutes ago, Thunder Chicken22 said:

Is there a way to run two random spawners simultaneously?

Yes, and quite easily. DML doesn't require any scripting on your part, so all you need is to change the flags that trigger a cloner. If you want the cloners to really spawn simultaneously (meaning they clone the groups inside their radius at exactly the same time, and for the same reason), you simply copy and paste the clone zone to another place on the map, then place the groups that you want to be cloned inside, and you are done. 

If it doesn't quite work as you expected, I'm sure we can work it out. If you haven't done so already, it may be helpful if you browsed the docs with emphasis on the clone zone chapter and the 'attack of the cloneZ' demo description.

Edited by cfrag
Posted
21 hours ago, cfrag said:

Yes, and quite easily. DML doesn't require any scripting on your part, so all you need is to change the flags that trigger a cloner. If you want the cloners to really spawn simultaneously (meaning they clone the groups inside their radius at exactly the same time, and for the same reason), you simply copy and paste the clone zone to another place on the map, then place the groups that you want to be cloned inside, and you are done. 

If it doesn't quite work as you expected, I'm sure we can work it out. If you haven't done so already, it may be helpful if you browsed the docs with emphasis on the clone zone chapter and the 'attack of the cloneZ' demo description.

 

Worked like a charm! I got greedy and tried for 3 spawns (one for friendly AI) but the third didn't work lol. But I'm going to peruse the documentation and the thread you have on it.  Looks to be a very powerful toolset for more than just random spawns.  Should really enhance my missions.  Again thanks for pointing me to this. 

  • Recently Browsing   0 members

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