
Originally Posted by
Gaia
No need to add eventhandlers to all units. You can set special init for every civilian created by Ambient Civilians module:
Code:
[
bis_alice_mainscope,
"ALICE_civilianinit",
[{
_this addeventhandler ["killed",{civ_casaulties = civ_casaulties + 1}]
}]
] call bis_fnc_variablespaceadd;
This will rise global variable civ_casaulties by 1 every time civilian is killed.
Gaia-
I attempted to use this structure to add an init to every ALICE civilian, but got a zero divisor error. It didn't say where, though, although it looks like it is associated with approximately line 17 of the fnc_civilianinit, where
Code:
_logic = BIS_alice_mainscope;
I tried this:
Code:
[bis_alice_mainscope, "ALICE_civilianinit",[{if ((random 1) < .4) then {[_this] execVM "JTD_ambientCivTraffic.sqf"};}]] call bis_fnc_variablespaceadd;
Now, I tried MANY different combinations of things.
Oh - and this was in the initialization portion of the editor-placed module. Is it more properly in the init of the mission? Ideally, I would like a way for a mission designer to just place the code in an init box (or have it as an addon module/game logic... but one step at a time). 
Thanks,
T