Kava_Brasil 0 Posted March 5, 2019 Hi, i got a script below (by killzone_kid), but when civilian killed by EAST or suicide by falling, then this script "bug". How can i do it if only WEST units killed a civilian? Thank you! On 5/28/2016 at 7:32 AM, killzone_kid said: Try this, put it in init.sqf in mission directory if (isServer) then { FNH_civilians_killed = 0; addMissionEventHandler ["EntityKilled", { _killed = _this select 0; if (side group _killed == civilian) then { FNH_civilians_killed = FNH_civilians_killed + 1; if (FNH_civilians_killed > 2) then { hint "XXXXXXXX"; tank enableAI "MOVE"; }; }; }]; }; Share this post Link to post Share on other sites
pierremgi 4935 Posted March 5, 2019 FNH_civilians_killed = 0; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (side group _killed == civilian && side _instigator == WEST) then { FNH_civilians_killed = FNH_civilians_killed + 1; if (FNH_civilians_killed > 2) then { hint "XXXXXXXX"; tank enableAI "MOVE"; }; }; }]; 1 Share this post Link to post Share on other sites
Kava_Brasil 0 Posted March 5, 2019 On 3/5/2019 at 2:27 AM, pierremgi said: FNH_civilians_killed = 0; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (side group _killed == civilian && side _instigator == WEST) then { FNH_civilians_killed = FNH_civilians_killed + 1; if (FNH_civilians_killed > 2) then { hint "XXXXXXXX"; tank enableAI "MOVE"; }; }; }]; Hi pierremgi, i apreciate for the help, but your script isnt working =( Image error: https://imgur.com/pUryHh9 Share this post Link to post Share on other sites
pierremgi 4935 Posted March 5, 2019 On 3/5/2019 at 5:11 AM, Kava_Brasil said: Hi pierremgi, i apreciate for the help, but your script isnt working =( Image error: https://imgur.com/pUryHh9 Not mine... I just added a condition for BLUFOR killers. Share this post Link to post Share on other sites
Kava_Brasil 0 Posted March 5, 2019 On 3/5/2019 at 6:54 AM, pierremgi said: Not mine... I just added a condition for BLUFOR killers. Is there anything that I may be doing wrong? Any idea ? Thank you. Share this post Link to post Share on other sites
Maff 251 Posted March 6, 2019 (edited) @Kava_Brasil It works 100% on my end. Although, I did get the same error as you though. There were some extra characters and some strange italics when I copied and pasted from your "error image" comment. It was weird... Edit: I typed it out in a new instance of notepad and it worked in ArmA. Give it a try. FNH_civilians_killed = 0; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (side group _killed == civilian && side _instigator == WEST) then { FNH_civilians_killed = FNH_civilians_killed + 1; if (FNH_civilians_killed > 2) then { hint "XXXXXXXX"; tank enableAI "MOVE"; }; }; }]; Edited March 6, 2019 by Maff Clarification Share this post Link to post Share on other sites
Kava_Brasil 0 Posted March 8, 2019 On 3/6/2019 at 2:12 PM, Maff said: @Kava_Brasil It works 100% on my end. Although, I did get the same error as you though. There were some extra characters and some strange italics when I copied and pasted from your "error image" comment. It was weird... Edit: I typed it out in a new instance of notepad and it worked in ArmA. Give it a try. FNH_civilians_killed = 0; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (side group _killed == civilian && side _instigator == WEST) then { FNH_civilians_killed = FNH_civilians_killed + 1; if (FNH_civilians_killed > 2) then { hint "XXXXXXXX"; tank enableAI "MOVE"; }; }; }]; Hi Maff, thank you for the help. It still does not work. Maybe it's because I'm using ACE and ACHILLES mod?! Share this post Link to post Share on other sites
Maff 251 Posted March 8, 2019 (edited) On 3/8/2019 at 2:41 AM, Kava_Brasil said: Hi Maff, thank you for the help. It still does not work. Maybe it's because I'm using ACE and ACHILLES mod?! Where are you placing this? I just gave it a test in debug console with ACE. I killed 3 civilians and got the "XXXXXXXX" hint. Update: Copying and pasting from the forum for me means the code doesn't work. It adds in hyphens before semicolons. Weird! This is working from the debug console. I will add a pastebin link also. FNH_civilians_killed = 0; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (side group _killed == civilian && {side _instigator == west}) then { FNH_civilians_killed = FNH_civilians_killed + 1; if (FNH_civilians_killed > 2) then { hint "Too many civilians have been killed."; }; }; } ]; https://pastebin.com/XC2KWpjh Edited March 8, 2019 by Maff Added update Share this post Link to post Share on other sites