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 :) )

ChromiumDis.png

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

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

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

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

Posted

Thanks Grimes! :)

ChromiumDis.png

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

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

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

  • 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...

ChromiumDis.png

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

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

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

  • Recently Browsing   0 members

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