Jump to content

Recommended Posts

Posted

my apologies if this has been covered - i searched but couldn't find a relevant answer

 

 

there's this line in the "Place Air Group" screen..

 

Image_017.jpg

 

there's a "condition" field and then a percent field next to it

 

 

 

does anybody know what that does??

 

 

 

i looked in the manual, but it looks like the manual is dated - the ME GUI has been updated since the manual was written - here is the corresponding area of the GUI as seen in the manual...

 

Image_020.jpg

i7-4790K | Asus Sabertooth Z97 MkI | 16Gb DDR3 | EVGA GTX 980 | TM Warthog | MFG Crosswind | Panasonic TC-58AX800U

 

[sIGPIC][/sIGPIC]

Posted

The condition box is for a lua script that runs after the initialization script but before mission actually starts. Whatever is in it must have "return true" or "return false" to define whether to spawn the group. I believe it is also dependent on the % value. Here is a small example of what could be in there...

 

if math.random(100) > 50 and curSpawns < 5 then
curSpawns = curSpawns + 1 
return true
end

That code could be copied into 10 groups condition script and as long as curSpawns is defined globally within the initialization script, it will randomly spawn up to 5 of the groups.

 

The % value defines the chance of the group existing within the mission. It can be used to replace having to make a trigger "Mission Start> Random 50%> Activate Group and checking "late activation". However there is one very important difference between the two. If the group doesn't spawn with the % value, then the group is "deleted" and it is impossible to spawn with triggers. If you simply used the triggers + late activation method you can spawn the group whenever you want.

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

thank you for the answer

 

i've been experimenting today and found that the % field does exactly that

 

as for the "conditions" field, haven't done "scripting" yet - don't understand it, its a foreign language to me - not sure i'll get into it

 

one question about it though.. the code you provided there - is THAT what goes into the box? or is the code saved to a file, given a name, and that filename goes in that box?

 

(sorry if i'm coming across as a total newb....)

i7-4790K | Asus Sabertooth Z97 MkI | 16Gb DDR3 | EVGA GTX 980 | TM Warthog | MFG Crosswind | Panasonic TC-58AX800U

 

[sIGPIC][/sIGPIC]

Posted

The code would go directly in the box.

 

But you'd need to add the following to run in the initialization script at the bottom of the triggers screen in order for it to work though. Basically "curSpawns" is undefined and has a value of nil. Without this you'd get a lua error.

 

curSpawns = 0

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

i see - gotcha

 

wow.. looks like i'm going to have to learn how to code in LUA

*sigh*

i7-4790K | Asus Sabertooth Z97 MkI | 16Gb DDR3 | EVGA GTX 980 | TM Warthog | MFG Crosswind | Panasonic TC-58AX800U

 

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

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