alezil 12 Posted September 19, 2016 So, i was tryng to make the AI (opfor) present in the entire level surrender when their total force is reduced to below 10 alive.So in the "On condition" space on the trigger configuration, I inserted the code below:({alive _x && side _x == east} count thisList) < 10The "on condition" part above works fine, if i select end#1 and kill some of the enemy. in other topic (from 3 years ago), someone gave a solution to a similar problem with a code that goes like this: ["({(side _x) == east} count allUnits) <= 10", "{if(side _x == east) then { _x playMoveNow 'AmovPercMstpSsurWnonDnon'; _x disableAI 'ANIM'; _x setCaptive true;}} foreach allUnits; win = true;", ""];So i tried to insert that in the "On activation space" only this part: "{if(side _x == east) then { _x playMoveNow 'AmovPercMstpSsurWnonDnon'; _x disableAI 'ANIM'; _x setCaptive true;}} foreach allUnits; win = true;", ""];I tried understand the mistake and change some brackets or inserting the original code, and i still get a error (more common one is "on activation missing"). And of course, it doesn't work because i really dont know what i am doing. I not sure if i am making a mistake on the On condition and on activation spaces and how this sections work or is some brackets that i leave behind.(I cannot find a surrender module o A3 either)If someone could help.The original post of 2013.https://forums.bistudio.com/topic/158387-how-to-entire-side-surrender/?hl=surrenderPs- Sorry for the bad english. Share this post Link to post Share on other sites
jshock 513 Posted September 19, 2016 Your condition should be good try the following in onAct: {if (side _x == east) then { _x playMoveNow 'AmovPercMstpSsurWnonDnon'; _x disableAI 'ANIM'; _x setCaptive true; }; } forEach thisList;I don't know if there is a Vanilla surrender module available, but the playMoveNow above uses the surrender (hands on head) animation, so you should be fine :). Share this post Link to post Share on other sites
alezil 12 Posted September 19, 2016 @jshockWorked!!Thanks!Much apreciated. Can i ask another question? The surrender command plus the dropweapon? if a m not asking much.{if (side _x == east) then _x action ["dropWeapon", _x, "primaryWeapon_man"]; { _x playMoveNow 'AmovPercMstpSsurWnonDnon'; _x disableAI 'ANIM'; _x setCaptive true; };]; } forEach thisList;or:{if (side _x == east) then _x = createVehicle ["GroundWeaponHolder", position cursorTarget, [], 0, "CAN_COLLIDE"]; { _x playMoveNow 'AmovPercMstpSsurWnonDnon'; _x disableAI 'ANIM'; _x setCaptive true; };]; } forEach thisList;(Is raining so i am in the notebook now, i cannot test) Share this post Link to post Share on other sites
jshock 513 Posted September 19, 2016 { if (side _x == east) then { holder = createVehicle ["GroundWeaponHolder", getPos _x, [], 0, "CAN_COLLIDE"]; _x action ["DropWeapon",holder,currentWeapon _x]; _x playMove 'AmovPercMstpSsurWnonDnon'; _x disableAI 'ANIM'; _x setCaptive true; holder = nil; }; } forEach thisList; Share this post Link to post Share on other sites
alezil 12 Posted September 22, 2016 @JshockThanks!Before the player need to kill every enemy in the area, losing time looking for one or two guys alive in AO.Now when the player capture the objective, the enemy surrender like it should and mission is over.Much apreciated. Share this post Link to post Share on other sites