dlder 13 Posted December 30, 2020 I want to place enemies "disabled" and enable them (with their orders, waypoints etc) on a trigger. But whatever I do, they attack me! I've tried: Special States > Simulation = disabled // these are group names: _StaticEnemies = ["Opfor_AA", "Opfor_SAM", "Opfor_Radar", "Opfor_Helicopters", "Opfor_JetAA", "Opfor_JetAG", "MGI3475"]; { { _x enableSimulationGlobal false; }forEach units _x; }forEach _StaticEnemies; this disableAI "AUTOCOMBAT"; this disableAI "TARGET"; this disableAI "AUTOTARGET"; disabling "DynamicSimulation" in mission setting I'm at a complete loss whatelse I could try.... Thanks in advance! Share this post Link to post Share on other sites
gc8 981 Posted December 30, 2020 (edited) doesn't this work? _StaticEnemies = [Opfor_AA, Opfor_SAM, Opfor_Radar, Opfor_Helicopters, Opfor_JetAA, Opfor_JetAG, MGI3475]; { { _x disableAI "AUTOCOMBAT"; _x disableAI "TARGET"; _x disableAI "AUTOTARGET"; }forEach units _x; }forEach _StaticEnemies; Edited December 30, 2020 by gc8 Removed quotes 1 Share this post Link to post Share on other sites
dlder 13 Posted January 7, 2021 Nope, unfortunately not; but I am gonna try it again and see what's what. Thx for your help! Share this post Link to post Share on other sites
pierremgi 4913 Posted January 8, 2021 1 are you sure your trigger in fine? 2 that's the name of units/vehicles? 3 disableAI for "autoCombat" is fine but the behaviour must be "safe" before. "aware" is not a peaceful state. 4 At last, don't play with dynamic simulation on script. Do it in editor. For script, use enableSimulation and hideObject(global) commands. 2 1 Share this post Link to post Share on other sites
dlder 13 Posted January 20, 2021 On 1/8/2021 at 4:24 PM, pierremgi said: 1 are you sure your trigger in fine? 2 that's the name of units/vehicles? 3 disableAI for "autoCombat" is fine but the behaviour must be "safe" before. "aware" is not a peaceful state. 4 At last, don't play with dynamic simulation on script. Do it in editor. For script, use enableSimulation and hideObject(global) commands. Thanks mate! I'm sorry it took so long to respond... I somehow never find enough time for Arma3 as I'd like or hope 😞 1) I don't have a trigger to enable them yet (as I haven't found a way to disable them^^) 2) well... actually that's the name of the groups 3) behaviour? good call, gonna try that next! 4) will look into that, thx! 1 Share this post Link to post Share on other sites
dlder 13 Posted January 21, 2021 A) Ok, I've tinkered with it a bit... disabling simulation on a (group of) Man or on a Vehicle in Eden, then enabling simulation via trigger works (I wrongly used foreach units before) Code to enable: _Obj = [Opfor_AATurrent1, Opfor_AATurrent2, Opfor_AATurrent3, Opfor_AATurrent4]; { _x enableSimulationGlobal true; }forEach _Obj; B) Disabling the AI works too, although it's a bit more trouble (but at least the enemy can be destroyed) Men group has variable name disable ANIM Code to enable: { _x enableAI "ANIM"; }forEach units GrpMen; Vehicle Group behaviour = SAFE Unit variable name Crew disable AI = "MOVE", "SAFE", "TARGET", "AUTOTARGET", "AUTOCOMBAT", "WEAPONAIM"; Code to enable: _Obj = [Opfor_AA1, Opfor_AA2, Opfor_AA3, Opfor_AA4]; { { _x setBehaviour "AWARE"; _x enableAI "TARGET"; _x enableAI "AUTOTARGET"; _x enableAI "AUTOCOMBAT"; _x enableAI "WEAPONAIM"; }forEach units _x; }forEach _Obj; This works for tanks and choppers; but not for planes!?! Any ideas why that might be the case and more importantly, what to do about it / change? Share this post Link to post Share on other sites
pierremgi 4913 Posted January 22, 2021 units gives an array of units in a group, not a crew, even if that can be same. so, units _x implies _x is a unit or a group opfor_AA1, Opfor_AA2 should be groups, even if objects are fine with units command. I guess a confusion here. You code probably works also for planes but you can't expect an immediate react of the awaken "sleeping beauty" . A reveal for enemies should help. Share this post Link to post Share on other sites
dlder 13 Posted January 22, 2021 Sry, I should've written it more clearly... the code to "awaken" / enabling the enemies work. But disabling the AI won't keep planes on the ground; even with "MOVE", "SAFE", "TARGET", "AUTOTARGET", "AUTOCOMBAT", "WEAPONAIM" disabled, they will take off and attack you. Everything else seems to work just fine. Share this post Link to post Share on other sites
Play3r 147 Posted January 23, 2021 On 1/22/2021 at 12:19 PM, dlder said: Sry, I should've written it more clearly... the code to "awaken" / enabling the enemies work. But disabling the AI won't keep planes on the ground; even with "MOVE", "SAFE", "TARGET", "AUTOTARGET", "AUTOCOMBAT", "WEAPONAIM" disabled, they will take off and attack you. Everything else seems to work just fine. Just use _plane setfuel 0 And when you want it to move just use _plane setfuel 1 1 Share this post Link to post Share on other sites
dlder 13 Posted January 23, 2021 LOL, not a bad idea 😄 stupid me, thx! 1 Share this post Link to post Share on other sites