Merge pull request #81 from Ghostrider-DbD-/Version-1.78-Build-108

Version 1 78 build 108
This commit is contained in:
Ghostrider [GRG] 2018-01-11 21:29:00 -05:00 committed by GitHub
commit 97772ad91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 153 additions and 196 deletions

View File

@ -19,84 +19,75 @@
private["_group","_wp","_wpPos","_dis","_arc","_dir","_newPos","_marker","_center","_minDis","_maxDis"]; private["_group","_wp","_wpPos","_dis","_arc","_dir","_newPos","_marker","_center","_minDis","_maxDis"];
_group = group _this; _group = group _this;
if (isServer) then _group setcombatmode "YELLOW";
_group setBehaviour "COMBAT";
_group setVariable["timeStamp",diag_tickTime];
_wp = [_group, 0];
_wpPos = getPos ((units _group) select 0);
_dir = _group getVariable["wpDir",0];
_center = _group getVariable ["patrolCenter",_wpPos];
if (_group getVariable["wpMode","random"] isEqualTo "random") then
{
_dir = random(360);
} else {
_dir = (_group getVariable["wpDir",0]) + 70;
_group setVariable["wpDir",_dir];
};
_minDis = _group getVariable["minDis",25];
_maxDis = _group getVariable["maxDis",30];
_dis = (_minDis) + random( (_maxDis) - (_minDis) );
_newPos = (_center) getPos[_dis,_dir];
_wp setWPPos [_newPos select 0, _newPos select 1];
_wp setWaypointCompletionRadius (_group getVariable["wpRadius",30]);
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "YELLOW";
_wp setWaypointTimeout [1,1.1,1.2];
_group setCurrentWaypoint _wp;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_changeToMoveWaypoint (4/25/17): _this = %1", _this];
diag_log format["_fnc_changeToMoveWaypoint: typeName _this = %1", typeName _this];
diag_log format["_fnc_changeToMoveWaypoint:_group = %1",_group];
diag_log format["_fnc_changeToMoveWaypoint:_group timestamp updated to %1", _group getVariable "timeStamp"];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> wpMode %1 _dir %2 _dis %3 _center %4",_group getVariable["wpMode","random"], _dir, _dis,_center];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new position is %2",_group, _newPos];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp];
diag_log format["_fnc_changeToMoveWaypoint:_group %1 basic waypoint parameters updates", _group getVariable "timeStamp"];
_marker =_group getVariable["wpMarker",""];
_marker setMarkerColor "ColorBlue";
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif
if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then
{ {
if (groupOwner _group > 2) exitWith
{
diag_log format["blck_fnc_changeToMoveWaypoint:: Running function on headless client %1 for group %2",groupOwner _group,_group];
[_group] remoteExec["blck_fnc_changeToMoveWaypoint",groupOwner _group];
};
}else{
_group setcombatmode "YELLOW";
_group setBehaviour "COMBAT";
_group setVariable["timeStamp",diag_tickTime,true];
_wp = [_group, 0];
_wpPos = getPos ((units _group) select 0);
_dir = _group getVariable["wpDir",0];
_center = _group getVariable ["patrolCenter",_wpPos];
if (_group getVariable["wpMode","random"] isEqualTo "random") then
{
_dir = random(360);
} else {
_dir = (_group getVariable["wpDir",0]) + 70;
_group setVariable["wpDir",_dir,true];
};
_minDis = _group getVariable["minDis",25];
_maxDis = _group getVariable["maxDis",30];
_dis = (_minDis) + random( (_maxDis) - (_minDis) );
_newPos = (_center) getPos[_dis,_dir];
_wp setWPPos [_newPos select 0, _newPos select 1];
_wp setWaypointCompletionRadius (_group getVariable["wpRadius",30]);
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "YELLOW";
_wp setWaypointTimeout [1,1.1,1.2];
_group setCurrentWaypoint _wp;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
{
diag_log format["_fnc_changeToMoveWaypoint (4/25/17): _this = %1", _this];
diag_log format["_fnc_changeToMoveWaypoint: typeName _this = %1", typeName _this];
diag_log format["_fnc_changeToMoveWaypoint:_group = %1",_group];
diag_log format["_fnc_changeToMoveWaypoint:_group timestamp updated to %1", _group getVariable "timeStamp"];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> wpMode %1 _dir %2 _dis %3 _center %4",_group getVariable["wpMode","random"], _dir, _dis,_center];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new position is %2",_group, _newPos];
diag_log format["_fnc_changeToMoveWaypoint:: -- >> group to update is %1 and new Waypoint position is %2",_group, getWPPos _wp];
diag_log format["_fnc_changeToMoveWaypoint:_group %1 basic waypoint parameters updates", _group getVariable "timeStamp"];
_marker =_group getVariable["wpMarker",""];
_marker setMarkerColor "ColorBlue";
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif
if (_group getVariable["wpPatrolMode",""] isEqualTo "SAD") then
{
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SAD Mode",_group];
};
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;"];
#endif
};
if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then
{
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SENTRY Mode",_group];
};
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SENTRY Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint;"];
#endif
};
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SAD Mode",_group];
}; };
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SAD Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToSADWaypoint;"];
#endif #endif
}; };
if (_group getVariable["wpPatrolMode",""] isEqualTo "SENTRY") then
{
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_changeToMoveWaypoint: seting waypoint script for group %1 to SENTRY Mode",_group];
};
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a SENTRY Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToSentryWaypoint;"];
#endif
};
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
};
#endif

View File

@ -21,41 +21,32 @@ diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled";
private["_group","_wp"]; private["_group","_wp"];
_group = group _this; _group = group _this;
if (isServer) then _group setVariable["timeStamp",diag_tickTime];
_group setcombatmode "RED";
_group setBehaviour "COMBAT";
_wp = [_group, 0];
_group setCurrentWaypoint _wp;
_wp setWaypointType "SAD";
_wp setWaypointName "sad";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [10,15,20];
#ifdef blck_debugMode
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{ {
if (groupOwner _group > 2) exitWith private ["_marker"];
{ _marker = _group getVariable["wpMarker",""];
diag_log format["blck_fnc_changeToSADWaypoint:: Running function on headless client %1 for group %2",groupOwner _group,_group]; _marker setMarkerColor "ColorRed";
[_group] remoteExec["blck_fnc_changeToSADWaypoint",groupOwner _group]; diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
}; diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
}else{ diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
_group setVariable["timeStamp",diag_tickTime,true]; diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
_group setcombatmode "RED"; };
_group setBehaviour "COMBAT"; #endif
_wp = [_group, 0];
_group setCurrentWaypoint _wp;
_wp setWaypointType "SAD";
_wp setWaypointName "sad";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [10,15,20];
#ifdef blck_debugMode
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 1) then
{
private ["_marker"];
_marker = _group getVariable["wpMarker",""];
_marker setMarkerColor "ColorRed";
diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
diag_log format["_fnc_changeToSADWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif
};

View File

@ -19,40 +19,31 @@ diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled";
private["_group","_wp"]; private["_group","_wp"];
_group = group _this; _group = group _this;
if (isServer) then _group setVariable["timeStamp",diag_tickTime];
{ _wp = [_group, 0];
if (groupOwner _group > 2) exitWith _group setCurrentWaypoint _wp;
{ _group setcombatmode "RED";
diag_log format["blck_fnc_changeToSentryWaypoint:: Running function on headless client %1 for group %2",groupOwner _group,_group]; _group setBehaviour "COMBAT";
[_group] remoteExec["blck_fnc_changeToSentryWaypoint",groupOwner _group]; _wp setWaypointType "SENTRY";
}; _wp setWaypointName "sentry";
} else { _wp setWaypointBehaviour "COMBAT";
_group setVariable["timeStamp",diag_tickTime,true]; _wp setWaypointCombatMode "RED";
_wp = [_group, 0]; _wp setWaypointTimeout [10,15,20];
_group setCurrentWaypoint _wp; #ifdef blck_debugMode
_group setcombatmode "RED"; _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
_group setBehaviour "COMBAT"; #else
_wp setWaypointType "SENTRY"; _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
_wp setWaypointName "sentry"; #endif
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [10,15,20];
#ifdef blck_debugMode
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint; diag_log format['====Updating timestamp for group %1 and changing its WP to a Move Waypoint',group this];"];
#else
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel >1) then if (blck_debugLevel >1) then
{ {
diag_log format["_fnc_changeToSentryWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; diag_log format["_fnc_changeToSentryWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
diag_log format["_fnc_changeToSentryWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; diag_log format["_fnc_changeToSentryWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
private ["_marker"]; private ["_marker"];
_marker = _group getVariable["wpMarker",""]; _marker = _group getVariable["wpMarker",""];
_marker setMarkerColor "ColorYellow"; _marker setMarkerColor "ColorYellow";
diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp]; diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"]; diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
}; };
#endif #endif
};

View File

@ -19,7 +19,7 @@ private["_group","_wp"];
diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this]; diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
_group = group _this; _group = group _this;
diag_log format["_fnc_emplacedWeaponWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group]; diag_log format["_fnc_emplacedWeaponWaypoint:: -- >> group to update is %1 with typeName %2",_group, typeName _group];
_group setVariable["timeStamp",diag_tickTime,true]; _group setVariable["timeStamp",diag_tickTime];
_wp = [_group, 0]; _wp = [_group, 0];
_group setCurrentWaypoint _wp; _group setCurrentWaypoint _wp;
diag_log format["_fnc_emplacedWeaponWaypoint:: -- >> group to update is %1 waypoints updated at %2",_group, (_group getVariable["timeStamp",diag_tickTime])]; diag_log format["_fnc_emplacedWeaponWaypoint:: -- >> group to update is %1 waypoints updated at %2",_group, (_group getVariable["timeStamp",diag_tickTime])];

View File

@ -5,7 +5,7 @@
If not it directs them to the next waypoint. If not it directs them to the next waypoint.
It uses a timestamp attached to the group that is cleared upon waypoint completion. It uses a timestamp attached to the group that is cleared upon waypoint completion.
By Ghostrider [GRG] By Ghostrider-DbD-
Last modified 3/14/17 Last modified 3/14/17
-------------------------- --------------------------
@ -82,10 +82,10 @@ _fn_monitorGroupWaypoints = {
_timeStamp = _x getVariable ["timeStamp",0]; _timeStamp = _x getVariable ["timeStamp",0];
if (_timeStamp isEqualTo 0) then { if (_timeStamp isEqualTo 0) then {
_x setVariable["timeStamp",diag_tickTime]; _x setVariable["timeStamp",diag_tickTime];
diag_log format["_fn_monitorGroupWaypoints::--> updating timestamp for group %1 at time %2",_x,diag_tickTime]; //diag_log format["_fn_monitorGroupWaypoints::--> updating timestamp for group %1 at time %2",_x,diag_tickTime];
}; };
_soldierType = _x getVariable["soldierType","null"]; _soldierType = _x getVariable["soldierType","null"];
diag_log format["_fn_monitorGroupWaypoints::--> soldierType for group %1 = %2 and timeStamp = %3",_x,_soldierType,_timeStamp]; //diag_log format["_fn_monitorGroupWaypoints::--> soldierType for group %1 = %2 and timeStamp = %3",_x,_soldierType,_timeStamp];
if (_soldierType isEqualTo "infantry") then if (_soldierType isEqualTo "infantry") then
{ {
@ -95,8 +95,6 @@ _fn_monitorGroupWaypoints = {
if (count _units > 0) then if (count _units > 0) then
{ {
private _leader = leader _x; private _leader = leader _x;
if (owner _x == 2) then
{
(_leader) call blck_fnc_changeToMoveWaypoint; (_leader) call blck_fnc_changeToMoveWaypoint;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: infantry group %1 stuck, waypoint reset",_x];}; if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: infantry group %1 stuck, waypoint reset",_x];};
@ -104,13 +102,10 @@ _fn_monitorGroupWaypoints = {
/* /*
if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then
{ {
}; };
*/ */
} else { };
[_x] remoteExec ["blck_fnc_changeToMoveWaypoint", owner _x];// [<params>] remoteExec ["someScriptCommand", targets, JIP];
};
}; };
}; };
@ -122,23 +117,17 @@ _fn_monitorGroupWaypoints = {
if (count _units > 0) then if (count _units > 0) then
{ {
private _leader = leader _x; private _leader = leader _x;
if (owner _x == 2) then
{
(_leader) call blck_fnc_changeToMoveWaypoint; (_leader) call blck_fnc_changeToMoveWaypoint;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: helicopter group %1 stuck, waypoint reset",_x];}; if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: vehicle group %1 stuck, waypoint reset",_x];};
#endif #endif
/* /*
if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then if ( (getPos _leader) distance2d (_group getVariable "patrolCenter") > 200) then
{ {
}; };
*/ */
} else {
[_x] remoteExec ["blck_fnc_changeToMoveWaypoint", owner _x];// [<params>] remoteExec ["someScriptCommand", targets, JIP];
};
}; };
}; };
}; };
if (_soldierType isEqualTo "helicopter") then if (_soldierType isEqualTo "helicopter") then
@ -149,8 +138,6 @@ _fn_monitorGroupWaypoints = {
if (count _units > 0) then if (count _units > 0) then
{ {
private _leader = leader _x; private _leader = leader _x;
if (owner _x == 2) then
{
(_leader) call blck_fnc_changeToMoveWaypoint; (_leader) call blck_fnc_changeToMoveWaypoint;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: helicopter group %1 stuck, waypoint reset",_x];}; if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: helicopter group %1 stuck, waypoint reset",_x];};
@ -161,9 +148,6 @@ _fn_monitorGroupWaypoints = {
}; };
*/ */
} else {
[_x] remoteExec ["blck_fnc_changeToMoveWaypoint", owner _x];// [<params>] remoteExec ["someScriptCommand", targets, JIP];
};
}; };
}; };
@ -187,7 +171,7 @@ _fn_simulationMonitor = {
// Be sure simulation is on for all units in the group // Be sure simulation is on for all units in the group
if !(_x getVariable["blck_simulationStatus",false]) then if !(_x getVariable["blck_simulationStatus",false]) then
{ {
_x setVariable["blck_simulationStatus",true,true]; _x setVariable["blck_simulationStatus",true];
{ {
_x enableSimulationGlobal true; _x enableSimulationGlobal true;
}forEach (units _x); }forEach (units _x);
@ -196,7 +180,7 @@ _fn_simulationMonitor = {
// Be sure simulation is off for all units in the group. // Be sure simulation is off for all units in the group.
if !(_x getVariable["blck_simulationStatus",true]) then if !(_x getVariable["blck_simulationStatus",true]) then
{ {
_x setVariable["blck_simulationStatus",false,true]; _x setVariable["blck_simulationStatus",false];
{ {
_x enableSimulationGlobal false; _x enableSimulationGlobal false;
}forEach (units _x); }forEach (units _x);
@ -216,4 +200,4 @@ uiSleep 0.1;
#ifndef useDynamicSimulation #ifndef useDynamicSimulation
[] call _fn_simulationMonitor; [] call _fn_simulationMonitor;
#endif #endif

View File

@ -18,7 +18,7 @@ private["_group","_wp","_index","_pattern","_mode","_arc","_dis","_wpPos"];
_group = group _this; _group = group _this;
_group setVariable["timeStamp",diag_tickTime,true]; _group setVariable["timeStamp",diag_tickTime];
_group setcombatmode "YELLOW"; _group setcombatmode "YELLOW";
_group setBehaviour "COMBAT" _group setBehaviour "COMBAT"
_wp = [_group, 0]; _wp = [_group, 0];
@ -29,7 +29,7 @@ _index = _index + 1;
_minDis = _group getVariable["minDis",0]; _minDis = _group getVariable["minDis",0];
_maxDis = _group getVariable["maxDis",0]; _maxDis = _group getVariable["maxDis",0];
dir = (_group getVariable["wpDir",0]) + _group getVariable["wpArc",360/5]; dir = (_group getVariable["wpDir",0]) + _group getVariable["wpArc",360/5];
_group setVariable["wpDir",_dir,true]; _group setVariable["wpDir",_dir];
diag_log format["_fnc_setNextWaypoint: -> _minDis = %1 | _maxDis = %2 | _arc = %3",_minDis,_maxDis,_arc]; diag_log format["_fnc_setNextWaypoint: -> _minDis = %1 | _maxDis = %2 | _arc = %3",_minDis,_maxDis,_arc];
if (_index >= (count _pattern)) then if (_index >= (count _pattern)) then
@ -39,7 +39,7 @@ if (_index >= (count _pattern)) then
diag_log format["_fnc_setNextWaypoint: -> waypoint index for group %1 is currently %2 with _pattern = %4 and count _pattern = %3",_group,_index, count _pattern,_pattern]; diag_log format["_fnc_setNextWaypoint: -> waypoint index for group %1 is currently %2 with _pattern = %4 and count _pattern = %3",_group,_index, count _pattern,_pattern];
}; };
_group setVariable["wpIndex",_index,true]; _group setVariable["wpIndex",_index];
_type = _pattern select _index; _type = _pattern select _index;
#ifdef blck_debugMode #ifdef blck_debugMode
@ -60,7 +60,7 @@ if (_type isEqualTo (toLower "move")) then
} else { } else {
_dir = _group getVariable["wpDir",0] + _group getVariable["wpArc",360/5]; _dir = _group getVariable["wpDir",0] + _group getVariable["wpArc",360/5];
}; };
_group setVariable["wpDir",_dir,true]; _group setVariable["wpDir",_dir];
_oldPos = waypointPosition _wp; _oldPos = waypointPosition _wp;
_newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc]; _newPos = (_group getVariable ["patrolCenter",_wpPos]) getPos[_dis,_arc];

View File

@ -23,7 +23,7 @@ private["_dir","_arc","_noWp","_newpos","_wpradius","_wp"];
params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ]; params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ];
_wp = [_group, 0]; _wp = [_group, 0];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel >= 2) then
{ {
diag_log format["_fnc_setupWaypoints (4/29/17): configuring waypoints for group %1: _mode = %2 | _wpPatrolMode = %3 _soldierType = %4",_group, _mode, _wpPatrolMode,_soldierType]; diag_log format["_fnc_setupWaypoints (4/29/17): configuring waypoints for group %1: _mode = %2 | _wpPatrolMode = %3 _soldierType = %4",_group, _mode, _wpPatrolMode,_soldierType];
}; };
@ -51,16 +51,16 @@ if !(_soldierType isEqualTo "emplaced") then
_arc = 360/5; _arc = 360/5;
_group setcombatmode "YELLOW"; _group setcombatmode "YELLOW";
_group setBehaviour "COMBAT"; _group setBehaviour "COMBAT";
_group setVariable["patrolCenter",_pos,true]; _group setVariable["patrolCenter",_pos];
_group setVariable["minDis",_minDis,true]; _group setVariable["minDis",_minDis];
_group setVariable["maxDis",_maxDis,true]; _group setVariable["maxDis",_maxDis];
_group setVariable["timeStamp",diag_tickTime,true]; _group setVariable["timeStamp",diag_tickTime];
_group setVariable["wpRadius",30,true]; _group setVariable["wpRadius",30];
_group setVariable["wpMode",_mode,true]; _group setVariable["wpMode",_mode];
_group setVariable["wpPatrolMode",_wpPatrolMode,true]; _group setVariable["wpPatrolMode",_wpPatrolMode];
_group setVariable["wpDir",0,true]; _group setVariable["wpDir",0];
_group setVariable["wpArc",_arc,true]; _group setVariable["wpArc",_arc];
_group setVariable["soldierType",_soldierType,true]; _group setVariable["soldierType",_soldierType];
_dir = 0; _dir = 0;
_wpradius = 30; _wpradius = 30;
@ -80,7 +80,7 @@ if !(_soldierType isEqualTo "emplaced") then
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"]; _wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif #endif
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel >= 2) then
{ {
_marker = createMarker [format["GroupMarker%1",_group],_newPos]; _marker = createMarker [format["GroupMarker%1",_group],_newPos];
_group setVariable["wpMarker",_marker,true]; _group setVariable["wpMarker",_marker,true];

View File

@ -38,9 +38,9 @@ _ai1 = ObjNull;
private _modType = call blck_fnc_getModType; private _modType = call blck_fnc_getModType;
if (_modType isEqualTo "Epoch") then if (_modType isEqualTo "Epoch") then
{ {
//"I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_ai1 = this", 0.7, "COLONEL"]; "I_Soldier_EPOCH" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"];
// _unit = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"]; // _unit = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"];
_ai1 = _aiGroup createUnit ["I_Soldier_EPOCH", _pos, [], blck_baseSkill, "FORM"]; //_ai1 = _aiGroup createUnit ["I_Soldier_EPOCH", _pos, [], blck_baseSkill, "FORM"];
switch(_skillLevel) do switch(_skillLevel) do
{ {
case "blue":{_ai1 setVariable["Crypto",1 + floor(random(blck_maxMoneyBlue)),true];}; case "blue":{_ai1 setVariable["Crypto",1 + floor(random(blck_maxMoneyBlue)),true];};
@ -51,8 +51,8 @@ if (_modType isEqualTo "Epoch") then
}; };
if (_modType isEqualTo "Exile") then if (_modType isEqualTo "Exile") then
{ {
//"i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"]; "i_g_soldier_unarmed_f" createUnit [_pos, _aiGroup, "_ai1 = this", blck_baseSkill, "COLONEL"];
_ai1 = _aiGroup createUnit ["i_g_soldier_unarmed_f", _pos, [], blck_baseSkill, "FORM"]; //_ai1 = _aiGroup createUnit ["i_g_soldier_unarmed_f", _pos, [], blck_baseSkill, "FORM"];
switch(_skillLevel) do switch(_skillLevel) do
{ {
case "blue":{_ai1 setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];}; case "blue":{_ai1 setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];};

View File

@ -58,7 +58,7 @@ if !(isNull _group) then
_unitNumber = _unitNumber + 1; _unitNumber = _unitNumber + 1;
}forEach (units _group); }forEach (units _group);
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]]; // params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_wpPatrolMode","SAD"],["_soldierType","null"] ];
_group setcombatmode "RED"; _group setcombatmode "RED";
_group setBehaviour "COMBAT"; _group setBehaviour "COMBAT";
[_center,_minDis,_maxDis,_group,"perimeter","SAD","vehicle"] spawn blck_fnc_setupWaypoints; [_center,_minDis,_maxDis,_group,"perimeter","SAD","vehicle"] spawn blck_fnc_setupWaypoints;