Jump to content

Recommended Posts

Posted

Hi all,

 

I'm looking for someone that could create three simple* script for ground groups only:

 

A) A script that set all ground units in the scenery in "AI OFF" condition;

B) A script that set all ground units in the scenery in "ROE: Return Fire" condition;

C) A script that set all ground units in the scenery in "ALARM STATE: Green" condition;

 

Thanks in advance for helping me :)

 

 

*(seems simple... I don't know if they really are :) )

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Github for latest version: https://github.com/Chromium18/DSMC

Posted

AI off... I'm not actually sure about. For whatever reason it doesnt seem documented, but I'm pretty sure its there. ROE and Alarm state are pretty straight forward. Assuming you want all ground AI to change...

 

for gpId, gpData in pairs(mist.DBs.groupsbyName) do

if gpData.category == 'vehicle' then

Group.getByName(gpId):getController():setOption(9, 1)

end

end

 

That should set alarm state green.

 

To set ROE return fire its the same script except setOption is setOption(0, 1)

Also the above example requires 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

  • 2 weeks later...
Posted

PS: I was looking for the other "setOption" possibility but I can't find a reference that tell me which option does what and what corrispective number does... ie. :

 

setOption(9, 2) does radar ON, but what does setOption(8, 1) or setOption(0, 3) ?

 

In the scripting engine wiki I found only the table of AI Behavior in the end of part2, but it doesn't show those index.

 

Thanks in advance...

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Github for latest version: https://github.com/Chromium18/DSMC

  • Recently Browsing   0 members

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