Mix0n 0 Posted June 26, 2020 So I have a patient spawner that spawns civillians with a damaged limbs for medical training. However, these guys start to run away sometimes as we are working on them and I'm trying to figure out how to set them captive without having to chase them down and try to flexcuff them or spawn a new one. Here's the code on the spawner can anyone help with this? Thanks! [MedicalData1,3] call BIS_fnc_dataTerminalAnimate; sleep 5; _group1=createGroup civilian; 'C_Man_1_enoch_F' createUnit [getmarkerPos 'patient1', _group1,'pat1=this; dostop pat1']; [pat1, selectRandom[0.3,.4,.5,.6], "leg_r", selectrandom ["stab","bullet","falling"]] call ace_medical_fnc_addDamageToUnit; [pat1, selectRandom[0.3,.4,.5,.6], "leg_l", selectrandom ["stab","bullet","falling"]] call ace_medical_fnc_addDamageToUnit; [pat1, selectRandom[0.3,.4,.5,.6], "body", selectrandom ["stab","bullet","falling"]] call ace_medical_fnc_addDamageToUnit; [pat1, selectRandom[0.3], "head", selectrandom ["stab","bullet","falling"]] call ace_medical_fnc_addDamageToUnit; [pat1, selectRandom[0.3,.4,.5,.6], "hand_r", selectrandom ["stab","bullet","falling"]] call ace_medical_fnc_addDamageToUnit; [pat1, selectRandom[0.3,.4,.5,.6], "hand_l", selectrandom ["stab","bullet","falling"]] call ace_medical_fnc_addDamageToUnit; [MedicalData1,0] call BIS_fnc_dataTerminalAnimate; hint 'Minor Patient Spawned'; pat1 addEventHandler ["Dammaged", { _unit = _this select 0; _part = _this select 1; _dam = _this select 2; if ((_part == "") and (_dam > 0.95)) then {_dam = 0.1}; _dam }]; //the first selctrandom chooses a randomish damage from a small one to a large one, the second selectrandom chooses the type of damage. Share this post Link to post Share on other sites
Harzach 2518 Posted June 26, 2020 What setCaptive essentially does is make the targeted unit a civilian, it doesn't "capture" them. Try: pat1 disableAI "MOVE"; 2 Share this post Link to post Share on other sites
beno_83au 1369 Posted June 26, 2020 Or set their behavior to "CARELESS" to avoid them being spooked by whatever is going on around them. 3 Share this post Link to post Share on other sites
pierremgi 4934 Posted June 27, 2020 unit disableAI "path" is fine also. 2 Share this post Link to post Share on other sites