OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: bardosy on 19 Oct 2010, 20:01:48

Title: turn off ambiant civilian?
Post by: bardosy on 19 Oct 2010, 20:01:48
Is it possible to turn off the ambiant civilian module? I just drop it on the map in the editor, and it works fine, but from the middle of the mission i need a deserted village, so i want turn it off: no more living civvis near the player. Is it possible?
Title: Re: turn off ambiant civilian?
Post by: Wolfrug on 19 Oct 2010, 21:38:41
Have you tried any of the options here: ALICE (http://community.bistudio.com/wiki/Ambient_Civilians), in particular civilianCount or maybe spawnDistance? I'm not sure if these things can be changed on the fly, but if they can, you should be able to make it really low while the player is inside the deserted city? Do try it out. Otherwise maybe you can do something with the individual town logics? That's all I've got - I've never really used ALICE, but I'm sure there's some disable function in there somewhere :)

Wolfrug out.
Title: Re: turn off ambiant civilian?
Post by: ZapBrannigan on 20 Oct 2010, 04:31:01
i think you can use the modules civilian init

Quote
ALICE_civilianinit = <array>; - array of codes which is executed upon every civilian unit created.
Example: [bis_loc_acityc_kozlovka,"ALICE_civilianinit",[{_this addweapon "Mk_48"}]] call bis_fnc_variablespaceadd;
(use function BIS_fnc_variablespaceadd to prevent replacing currently existing codes)
Default value: none

place a marker in the town and in then execute a script in the civilianinit that checks if the civilian is within 200 meters of the marker and if it is then deletes them.

not tested just an idea.


or you could forget the module and place a trigger around the town and make it delete any civilians it detects. 
Title: Re: turn off ambiant civilian?
Post by: bardosy on 20 Oct 2010, 14:06:17
Zap, I reverse your idea and maybe it fit to me... :)

I delete the ALICE module from the mission and I add a few randomly moving civilian to the other village.. Only differences, my script will not send them into buildings. Can you send civilians (any unit) into totally random building, totaly random place?


Wolfrug, thanks! When you mentioned you never used ALICE, I just started wondering why I want to use it.