Is there a way to make captives set not captives when enemies see them carrying weapon?
Is there a way to make captives set not captives when enemies see them carrying weapon?
http://community.bistudio.com/wiki/currentWeapon
Works in Arma2
assuming your unit is West and enemy is East,
create a trigger with a large enough radius to cover all East units, press F2 and group it to your soldier, select "Any Group Member"/"Repeatedly"/"Detected by East". in the condition type " this and (unit'sName hasWeapon "weaponName") "
and in activation type " unit'sName setCaptive False "
this will work as long as you expect your captive units to obtain a specific type of weapon, otherwise use " this and (someAmmo unit'sName) ", assuming that your captive units begin with no weapons or grenades...
alternatively, place a trigger with large radius and set "Anybody"/"Repeatedly"/"Detected by East" and in activation put "detectedList = thislist". now run a script to check if the captives have weapons and are in the detectedList.
Code:_captives = [soldier1,soldier2.....] #start _count = (count _captives)-1 #loop ~0.1 _captive = _captives select _count ? (_captive in detectedList) and (someAmmo _captive) : _captive setCaptive False ; _captives = _captives - [_captive] _count = _count - 1 ? _count > - 1 : goto "loop" goto "start"
Last edited by SilverRanger; Aug 6 2010 at 13:25.
Sorry about that, didn't see which forum this was in.
Thank you for answering! I meant really that the captives are not set "not captives" until they take weapons in hand (they have revolvers, so enemies don't see them if they are "in back") But this is good enough. I can make them get the weapons from some barrel and keep the guns in hand the whole time.
EDIT: Except that upper option. When I use it, enemy notices the weapons when I shoot at them. I'll use it
Last edited by Suomileijona; Aug 6 2010 at 15:39.
there are a couple of more options to do it. the simplest would be to put "setcaptive false" in their waypoints activation fields. if you want to the enemy to notice them only after they have fired, add this to their init field
Code:this addEventHandler ["fired","(_this select 0) setCaptive false"]