Jump to content

Recommended Posts

Posted

Eh guys,

 

I'm trying to help myself here by working through the MIST guide but unfortunately I lack any fundamental knowledge about the scripting process. I'm stuck in how to apply unit tables- and how to populate them. I might as well be reading in Russian.

 

I just read down the file a bit and found this entry. This will undoubtedly be my starting point:

 

mist.flagFunc.units_in_zones{

units = {'[blue][vehicle]'},

zones = {'Point Bastion'},

flag = 99,

req_num = 8,

stopflag = 1000

}

 

 

What I want to be able to do is set a flag for when only ground vehicles enter a particular zone. I can build what I need off that flag through triggers.

 

I can edit the file above to suit my needs- but I guess what I need to know is whether or not the "table" is already created or if you need to go and create the table to say "which vehicles are in the table "vehicles.""

 

 

 

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Posted

Page 6 of the Mist documentation has all of the unit table data with quite a few examples. Basically you use identifiers to create a list of requirements for a unit to be added to the unit table. The example '[blue][vehicle]' simply iterates through all units currently in the mission, checks if they are alive, if a unit is on the blue coalition and is of the type "vehicle" it will add data on that specific unit to a table. The table is then returned so that further scripts can do whatever they want with the data.

 

However in this example the function mist.flagFunc.units_in_zones() does all of the other work for you with regard to the scripts. It creates the unitTable based on whatever is inside "units = X". It then iterates through each of the units found and checks if they are inside the zone.

 

 

The way you'd use the function is you simply set it up in a trigger:

Once> Time Less than 10> Do Script(mist.flagFunc.units_in_zones{...... })

and then have another trigger

Once>Flag 99 is True> Do Action

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Thanks Grimes (again). I wasn't sure if the table was something I needed to populate in advance or if, as you said, MIST does all the work...

 

I've got it set up and it worked really well.

 

I also noticed one of my other problems when I was using a MIST script I needed to add a "time is more (2)" condition so that it would give MIST a chance to get loaded in at the start. I found it in a little section I'd overlooked in the guide.

 

Awesome tool.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Posted

You can safely use Mist on a Mission Start> Time Less 5> Do Script File trigger and then simply put every trigger that starts a mist function on a Once>Time Less 5>Do Script

 

I'll update the documentation on that for the next release of Mist.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Really enjoying this thanks to you and speed and a few other guys who have helped along the way.

 

Just rolled out another mission now called "Welcome to the Suk." Still just a primer with loads to do but it was ready to roll out for problem solving. Heavy CA influence helps to cut down on the complex triggers but unfortunately at the expense of the game hanging a bit if there is nobody to "direct traffic."

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

  • Recently Browsing   0 members

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