fatty86 10 Posted November 3, 2010 Using Alice (Expansion), I have the following code in the module's init field: [bis_alice_mainscope, "ALICE_civilianinit", [{_this addeventhandler ["killed",{if (side (_this select 1) == west) then {civ_casualties = civ_casualties + 1}}]}]] call bis_fnc_variablespaceadd; I swore I had this working before, but now when I have a trigger set with "civ_casualties = 1", nothing happens when civilians are killed by US soldiers. I've double-checked that I'm declaring civ_casualties as 0 in my init.sqf. No errors are produced. Any ideas? Am I missing something in my syntax? Share this post Link to post Share on other sites
st_dux 26 Posted November 3, 2010 To check civ_casualties, you need to use == rather than =. A single equal sign is an assignment operator. Share this post Link to post Share on other sites
fatty86 10 Posted November 3, 2010 Thanks for the tip. I changed that, but still no joy. Am able to confirm that civ_casualties is set to zero on mission start (changing the trigger to check for == 0 fires on mission start). So I think the problem must lie with the civilianinit bit above. Share this post Link to post Share on other sites
st_dux 26 Posted November 4, 2010 Try changing it to: this setVariable ["ALICE_civilianinit",[{_this addeventhandler ["killed",{if (side (_this select 1) == west) then {civ_casualties = civ_casualties + 1}}]}] Share this post Link to post Share on other sites
fatty86 10 Posted November 4, 2010 Bingo! That was it. Thanks mayne. Share this post Link to post Share on other sites