Skip to content

Commit

Permalink
Spread out guards around HQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Freddo3000 committed Jun 10, 2019
1 parent 8a11f6e commit 2113a3c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions source/functions/initHQ/fn_BluHQinit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _group = createGroup west;
_hq = _group createUnit [Blufor_Officer,(getmarkerpos str(blu_hq_markername)), [], 0, "FORM"];
hq_blu1 = _hq;
publicVariable "hq_blu1";
_hq setpos [_hqblu select 0, _hqblu select 1, 0.59];
_hq setpos [_hqblu select 0, _hqblu select 1, 0.59];
_hq disableAI "AUTOTARGET";
_hq disableAI "MOVE";
removeallweapons _hq;
Expand All @@ -62,8 +62,8 @@ _handle = [(getpos hq_blu1), _hq] spawn duws_fnc_fortify;
};

//CREATE PATROL
[getpos hq_blu1] call duws_fnc_guardsHQ;
[getpos hq_blu1] call duws_fnc_guardsHQ;
[getpos hq_blu1, 40] call duws_fnc_guardsHQ;
[getpos hq_blu1, 60] call duws_fnc_guardsHQ;

// IF THE OFFICER IS DEAD -- End OF "SPAWN"

Expand Down Expand Up @@ -111,4 +111,4 @@ if (debugmode) exitWith {};

if (isServer) then {
_sitrep = [player,"sitrep"] call BIS_fnc_addCommMenuItem;
};
};
36 changes: 18 additions & 18 deletions source/functions/initHQ/fn_guardsHQ.sqf
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
params ["_centerPos"];
params ["_centerPos", "_distance"];

// patrolling guard
_groupPatrol = [ [(_centerPos select 0)+40, (_centerPos select 1)+40], WEST, [Blufor_Rifleman,Blufor_Rifleman,Blufor_AT_Specialist,Blufor_Engineer,Blufor_Medic,Blufor_Recon_Scout,Blufor_AT_Specialist,Blufor_AA_Specialist],[],[],[0.6,0.8,0.7]] call BIS_fnc_spawnGroup;
_groupPatrol = [ [(_centerPos select 0)+_distance, (_centerPos select 1)+_distance], WEST, [Blufor_Rifleman,Blufor_Rifleman,Blufor_AT_Specialist,Blufor_Engineer,Blufor_Medic,Blufor_Recon_Scout,Blufor_AT_Specialist,Blufor_AA_Specialist],[],[],[0.6,0.8,0.7]] call BIS_fnc_spawnGroup;

_groupPatrol setCombatMode "YELLOW";
_wp = _groupPatrol addWaypoint [[(_centerPos select 0)+40, (_centerPos select 1)+40], 0];
_wp setWaypointType "MOVE";
_wp = _groupPatrol addWaypoint [[(_centerPos select 0)+_distance, (_centerPos select 1)+_distance], 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "SAFE";
_wp setWaypointSpeed "LIMITED";

_wp = _groupPatrol addWaypoint [[(_centerPos select 0)-40, (_centerPos select 1)+40], 0];
_wp setWaypointType "MOVE";
_wp = _groupPatrol addWaypoint [[(_centerPos select 0)-_distance, (_centerPos select 1)+_distance], 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "SAFE";
_wp setWaypointSpeed "LIMITED";
_wp = _groupPatrol addWaypoint [[(_centerPos select 0)-40, (_centerPos select 1)-40], 0];
_wp setWaypointType "MOVE";
_wp setWaypointSpeed "LIMITED";

_wp = _groupPatrol addWaypoint [[(_centerPos select 0)-_distance, (_centerPos select 1)-_distance], 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "SAFE";
_wp setWaypointSpeed "LIMITED";
_wp setWaypointSpeed "LIMITED";

_wp = _groupPatrol addWaypoint [[(_centerPos select 0)+_distance, (_centerPos select 1)-_distance], 0];
_wp setWaypointType "MOVE";

_wp = _groupPatrol addWaypoint [[(_centerPos select 0)+40, (_centerPos select 1)-40], 0];
_wp setWaypointType "MOVE";

_wp = _groupPatrol addWaypoint [[(_centerPos select 0)+40, (_centerPos select 1)+40], 0];
_wp setWaypointType "CYCLE";
_wp = _groupPatrol addWaypoint [[(_centerPos select 0)+_distance, (_centerPos select 1)+_distance], 0];
_wp setWaypointType "CYCLE";
_wp setWaypointBehaviour "SAFE";
_wp setWaypointSpeed "LIMITED";

// ADD Infinite Ammo eventhandler
{
_x addEventHandler ["Fired",{(_this select 0) setvehicleammo 1}];
_x addEventHandler ["HandleDamage", {false}];
_x addEventHandler ["Fired",{(_this select 0) setvehicleammo 1}];
_x addEventHandler ["HandleDamage", {false}];
} forEach (units _groupPatrol);
2 changes: 1 addition & 1 deletion source/includes/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class CfgFunctions
class guardsFOB {};
// [_centerPos, _fob, _size] call duws_fnc_guardsFOB
class guardsHQ {};
// [_centerPos] call duws_fnc_guardsHQ
// [_centerPos, _distance] call duws_fnc_guardsHQ
class hq_radioloop {};
// [_object] spawn duws_fnc_radioloop
class HQaddactions {};
Expand Down

0 comments on commit 2113a3c

Please sign in to comment.