Jump to content
Sign in to follow this  
fatty86

ALICE_civilianinit Troubleshooting

Recommended Posts

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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×