Skip to content

Instantly share code, notes, and snippets.

@GeorgeDettmer
Created June 11, 2016 15:38
Show Gist options
  • Save GeorgeDettmer/5a33ea84fd3f6bf9c443c76c48a91484 to your computer and use it in GitHub Desktop.
Save GeorgeDettmer/5a33ea84fd3f6bf9c443c76c48a91484 to your computer and use it in GitHub Desktop.
[targetGroup,delay,yourGroup] spawn {
followWaypoint = param[2,group player] addWaypoint [param[0,grpNull,[grpNull]]];
while {TRUE} do {
uiSleep param[1,5,[0]]
param[2,group player] addWaypoint [param[0,grpNull,[grpNull]],followWaypoint];
};
};
@DEL-J
Copy link

DEL-J commented Jun 11, 2016

How might that work in this context:

_Group2A = [getpos leader _Group16, independent, [
"I_Soldier_SL_F","I_Soldier_TL_F","I_Soldier_F","I_Soldier_F","I_Soldier_AR_F"],[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_Group2B = [getpos leader _Group16, independent, [
"I_Soldier_TL_F","I_Soldier_F","I_Soldier_F","I_Soldier_AR_F"],[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_Group2C = [getpos leader _Group16, independent, [
"I_Soldier_TL_F","I_Soldier_F","I_Soldier_LAT_F","I_Soldier_AR_F"],[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_wp2A = _Group2A addWaypoint [getpos (leader _Group16) vectorAdd [200,100,0], 0];
_wp2A setWaypointType "MOVE";
_wp2A setWaypointSpeed "LIMITED";
_wp2A setWaypointBehaviour "SAFE";

_wp2A2 = _Group2A addWaypoint [getpos (leader _Group16) vectorAdd [200,-100,0], 0];
_wp2A3 = _Group2A addWaypoint [getpos (leader _Group16) vectorAdd [-10,0,0], 0];
_wp2A3 setWaypointTimeout [10,10,10];
_wp2A4 = _Group2A addWaypoint [getpos (leader _Group16) vectorAdd [0,0,0], 0];
_wp2A4 setWaypointType "CYCLE";

_wp2B = _Group2B addWaypoint [getpos (leader _Group16) vectorAdd [200,100,0], 0];
_wp2B setWaypointType "MOVE";
_wp2B setWaypointSpeed "LIMITED";
_wp2B setWaypointBehaviour "SAFE";

_wp2B2 = _Group2B addWaypoint [getpos (leader _Group16) vectorAdd [200,-100,0], 0];
_wp2B3 = _Group2B addWaypoint [getpos (leader _Group16) vectorAdd [-5,0,0], 0];
_wp2B3 setWaypointTimeout [10,10,10];
_wp2B4 = _Group2B addWaypoint [getpos (leader _Group16) vectorAdd [0,0,0], 0];
_wp2B4 setWaypointType "CYCLE";

_wp2C = _Group2C addWaypoint [getpos (leader _Group16) vectorAdd [200,100,0], 0];
_wp2C setWaypointType "MOVE";
_wp2C setWaypointSpeed "LIMITED";
_wp2C setWaypointBehaviour "SAFE";

_wp2C2 = _Group2C addWaypoint [getpos (leader _Group16) vectorAdd [200,-100,0], 0];
_wp2C3 = _Group2C addWaypoint [getpos (leader _Group16) vectorAdd [-10,-10,0], 0];
_wp2C3 setWaypointTimeout [10,10,10];
_wp2C4 = _Group2C addWaypoint [getpos (leader _Group16) vectorAdd [0,0,0], 0];
_wp2C4 setWaypointType "CYCLE";

Where I want to have two groups following the one indefinitely. Also, would you know of a simple way to make the three groups act "DISMISSED" at a certain point, then cancel the dismissed behavior after a certain time and resuming their patrol behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment