chromium Posted June 9, 2013 Posted June 9, 2013 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/ 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.
Grimes Posted June 9, 2013 Posted June 9, 2013 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
chromium Posted June 9, 2013 Author Posted June 9, 2013 Thanks Grimes! :) 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.
chromium Posted June 23, 2013 Author Posted June 23, 2013 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/ 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.
Recommended Posts