Skip to content

Commit

Permalink
Merge pull request #371 from Vdauphin/FIX-hostage
Browse files Browse the repository at this point in the history
FIX: Side mission Hostage
  • Loading branch information
Vdauphin authored Jun 12, 2017
2 parents fec9609 + c054647 commit e7f23f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/side/hostage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ _group_civ setVariable ["no_cache",true];
(selectRandom btc_civ_type_units) createUnit [_pos, _group_civ, "_captive = this;"];
waitUntil {local _captive};
[_captive,true] call ACE_captives_fnc_setHandcuffed;
_captive setPos _pos;
_captive setPosATL _pos;
_captive call btc_fnc_civ_unit_create;

_group = [];
{
private ["_grp"];
_grp = createGroup btc_enemy_side;
_unit = _grp createUnit [selectRandom btc_type_units, _x, [], 0, "NONE"];
_unit setPos _x;
_unit setPosATL _x;
_group pushBack _grp;
_grp setVariable ["no_cache",true];
_unit call btc_fnc_mil_unit_create;
Expand All @@ -60,9 +60,10 @@ _trigger = createTrigger["EmptyDetector",_pos];
_trigger setVariable ["group", _group];
_trigger setTriggerArea[20,20,0,false];
_trigger setTriggerActivation[str(btc_player_side),"PRESENT",true];
_trigger setTriggerStatements["this", "_group = thisTrigger getVariable 'group'; {_x setCombatMode 'RED';} foreach _group;", "_group = thisTrigger getVariable 'group'; {_x setCombatMode 'WHITE';} foreach _group;"];
_trigger setTriggerStatements["this", "private _group = thisTrigger getVariable 'group'; {_x setCombatMode 'RED';} foreach _group;", "private _group = thisTrigger getVariable 'group'; {_x setCombatMode 'WHITE';} foreach _group;"];

if (random 1 > 0.5) then {
sleep 5;
_mine = createMine [selectRandom btc_type_mines, getposATL _captive, [], 0];
} else {
_mine = objNull;
Expand Down

0 comments on commit e7f23f3

Please sign in to comment.