Jump to content

cloneInZone from a list of vehicles?


maverickturner

Recommended Posts

I'm having trouble finding out how to use lists/dynamic lists of units.

I have 10 individual (not grouped) units off to the side of the map that I would like to clone into a zone when a trigger is met. However, I'm looking to set each trigger with a specific number of units to clone from the 10 units available.

 

Example -

If flag1 == 1 then 
grab 6 random units from the unit list and clone in zone1

If flag2 == 1 then 
grab 4 random units from the unit list and clone in zone2 

 

I've been searching around for this and believe I am just missing something very simple to understand. Any help would be greatly appreciated.

Link to comment
Share on other sites

Your question got my curiosity going and I ended up creating the attached demo mission (it uses MOOSE, though).

 

Instead of 10 individual units, there are 8 different group templates (4 group templates of 6 units each and another 4 group templates of 4 units each).

 

The group templates of 6 units are set to spawn randomly in zone1 only.

The group templates of 4 units are set to spawn randomly in zone2 only.

 

Flags and flag checkers are used to manage the whole thing, but, for convenience, I've created a simple F10 menu command structure for the two client Su25Ts in the mission , so you can spawn the groups at will.

 

I've also added a cleanup routine, which will remove previously existing groups in the other zone every time a new group template spawns.

 

Try it out, see if you find something interesting that can be used in your mission.

Randomized template spawn on trigger - command.miz

Spawn random group templates in different zones.lua


Edited by Hardcard
Link to comment
Share on other sites

Your question got my curiosity going and I ended up creating the attached demo mission (it uses MOOSE, though).

 

Instead of 10 individual units, there are 8 different group templates (4 group templates of 6 units each and another 4 group templates of 4 units each).

 

The group templates of 6 units are set to spawn randomly in zone1 only.

The group templates of 4 units are set to spawn randomly in zone2 only.

 

Flags and flag checkers are used to manage the whole thing, but, for convenience, I've created a simple F10 menu command structure for the two client Su25Ts in the mission , so you can spawn the groups at will.

 

I've also added a cleanup routine, which will remove previously existing groups in the other zone every time a new group template spawns.

 

Try it out, see if you find something interesting that can be used in your mission.

 

I wasn't interested in the actual topic, but after looking at the lua, I like what you did here.

 

Making a template table and then operating off a SET_GROUP prefix filter based on the values is something I hadn't considered.

 

Thanks for revealing another kung fu move.

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

  • Recently Browsing   0 members

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