Frag Posted May 9, 2021 Posted May 9, 2021 (edited) Hi guys, I am pretty sure that I have done this in the past, but it seems that it no longer works. Unless I miss something. Here is a simple question. How do I change the ROE of a group with moose so it will start attacking the enemy? In my sample mission example I: - I start moose as usual on a mission start trigger. - Put a blue Bradley, with the group name "bradley" on the field. - Close by, I put a red M818 group named "truck" - For the bradley, at the initial waypoint 0, I set the option ROE->Weapon Hold - I create a trigger "Time more 20" which execute that script after 20 seconds gpPlayer = GROUP:FindByName("bradley") gpPlayer:OptionAlarmStateRed() gpPlayer:OptionROEWeaponFree() The effect should be that the bradley do not attack the truck in the first 20 seconds. There are no error in the logs. I even notice after 20 seconds that the bradley deploy its missile system. But it never attacks the truck. I tried with few unit types, same issue. What am I doing wrong? I found few very old thread on the subject, but I was not able to find the answer to this. Edited May 9, 2021 by Frag
Frag Posted May 9, 2021 Author Posted May 9, 2021 (edited) I was able to do this with the following, but not with moose. - On the bradley I create a Trigger action named "SwitchToFree" in the group menu. - On my trigger "Time more 20" I add the action "AI Task Push (SwitchToFree). How could I still do that with moose? Edited May 9, 2021 by Frag
dark_wood Posted May 9, 2021 Posted May 9, 2021 Hi, i think it needs to be CONTROLLABLE:OptionROEWeaponFree https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Controllable.html https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Controllable.html##(CONTROLLABLE).OptionROEWeaponFree
Frag Posted May 10, 2021 Author Posted May 10, 2021 I am a bit surprised that nobody could hint on this. It seems like quite a basic functionality. 19 hours ago, dark_wood said: Hi, i think it needs to be CONTROLLABLE:OptionROEWeaponFree https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Controllable.html https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Wrapper.Controllable.html##(CONTROLLABLE).OptionROEWeaponFree Thanks for the answer, but it is exactly the call I am using and wrote down in my example. gpPlayer = GROUP:FindByName("bradley") gpPlayer:OptionAlarmStateRed() gpPlayer:OptionROEWeaponFree()
dark_wood Posted May 10, 2021 Posted May 10, 2021 1 hour ago, Frag said: Thanks for the answer, but it is exactly the call I am using and wrote down in my example. Right, apologies, sometime I hurry and read mainly the title - maybe is the 20 seconds trigger? Try to use a scheduler instead, or try to do debug it, spit out a message with something else than ROE: local gpPlayer = GROUP:FindByName("bradley") local groupLive= gpPlayer:GetLife() trigger.action.outText('Group life is: '..groupLive, 10) Also, you can move initial ROE 'hold' from waypoint to advanced tasks, and push it on with MISSION START trigger Maybe you should attach the .miz file to a post here, so we can take a look at it.
toutenglisse Posted May 10, 2021 Posted May 10, 2021 On 5/9/2021 at 4:49 PM, Frag said: ...How do I change the ROE of a group with moose so it will start attacking the enemy?... You can try with the original DCS script functions : Group.getByName('bradley'):getController():setOption( 0, 0 ) --ROE weapon free Group.getByName('bradley'):getController():setOption( 9, 2 ) --Alarm State red
dark_wood Posted May 10, 2021 Posted May 10, 2021 (edited) Tested myself, is working with open fire local gpPlayer = GROUP:FindByName("bradley") gpPlayer:OptionROEOpenFire() moose_test.miz See attached miz file Edited May 10, 2021 by dark_wood
Recommended Posts