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,17 +19,9 @@
private["_group","_wp","_wpPos","_dis","_arc","_dir","_newPos","_marker","_center","_minDis","_maxDis"];
_group = group _this;
if (isServer) 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];
_group setVariable["timeStamp",diag_tickTime];
_wp = [_group, 0];
_wpPos = getPos ((units _group) select 0);
_dir = _group getVariable["wpDir",0];
@ -39,7 +31,7 @@ if (isServer) then
_dir = random(360);
} else {
_dir = (_group getVariable["wpDir",0]) + 70;
_group setVariable["wpDir",_dir,true];
_group setVariable["wpDir",_dir];
};
_minDis = _group getVariable["minDis",25];
_maxDis = _group getVariable["maxDis",30];
@ -99,4 +91,3 @@ if (isServer) then
diag_log format["_fnc_changeToMoveWaypoint:: -- >> Waypoint statements for group %1 have been configured as %2",_group, waypointStatements _wp];
};
#endif
};

View File

@ -21,15 +21,7 @@ diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled";
private["_group","_wp"];
_group = group _this;
if (isServer) then
{
if (groupOwner _group > 2) exitWith
{
diag_log format["blck_fnc_changeToSADWaypoint:: Running function on headless client %1 for group %2",groupOwner _group,_group];
[_group] remoteExec["blck_fnc_changeToSADWaypoint",groupOwner _group];
};
}else{
_group setVariable["timeStamp",diag_tickTime,true];
_group setVariable["timeStamp",diag_tickTime];
_group setcombatmode "RED";
_group setBehaviour "COMBAT";
_wp = [_group, 0];
@ -58,4 +50,3 @@ if (isServer) then
diag_log format["_fnc_changeToSADWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif
};

View File

@ -19,15 +19,7 @@ diag_log "_fnc_changeToSADWaypoint: blck_debugMode enabled";
private["_group","_wp"];
_group = group _this;
if (isServer) then
{
if (groupOwner _group > 2) exitWith
{
diag_log format["blck_fnc_changeToSentryWaypoint:: Running function on headless client %1 for group %2",groupOwner _group,_group];
[_group] remoteExec["blck_fnc_changeToSentryWaypoint",groupOwner _group];
};
} else {
_group setVariable["timeStamp",diag_tickTime,true];
_group setVariable["timeStamp",diag_tickTime];
_wp = [_group, 0];
_group setCurrentWaypoint _wp;
_group setcombatmode "RED";
@ -55,4 +47,3 @@ if (isServer) then
diag_log format["_fnc_changeToSentryWaypoint:: -- >> Waypoint marker for group %1 have been configured as %2",_group, _group getVariable "wpMarker"];
};
#endif
};

View File

@ -19,7 +19,7 @@ private["_group","_wp"];
diag_log format["_fnc_changeToSADWaypoint:: -- :: _this = %1 and typName _this %2",_this, typeName _this];
_group = group _this;
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];
_group setCurrentWaypoint _wp;
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.
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
--------------------------
@ -82,10 +82,10 @@ _fn_monitorGroupWaypoints = {
_timeStamp = _x getVariable ["timeStamp",0];
if (_timeStamp isEqualTo 0) then {
_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"];
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
{
@ -95,8 +95,6 @@ _fn_monitorGroupWaypoints = {
if (count _units > 0) then
{
private _leader = leader _x;
if (owner _x == 2) then
{
(_leader) call blck_fnc_changeToMoveWaypoint;
#ifdef blck_debugMode
if (blck_debugLevel > 2) then {diag_log format["_fnc_missionGroupMonitor: infantry group %1 stuck, waypoint reset",_x];};
@ -107,11 +105,8 @@ _fn_monitorGroupWaypoints = {
};
*/
} else {
[_x] remoteExec ["blck_fnc_changeToMoveWaypoint", owner _x];// [<params>] remoteExec ["someScriptCommand", targets, JIP];
};
};
};
if (_soldierType isEqualTo "vehicle") then
@ -122,25 +117,19 @@ _fn_monitorGroupWaypoints = {
if (count _units > 0) then
{
private _leader = leader _x;
if (owner _x == 2) then
{
(_leader) call blck_fnc_changeToMoveWaypoint;
#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
/*
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 (diag_tickTime > (_x getVariable "timeStamp") + 60) then
@ -149,8 +138,6 @@ _fn_monitorGroupWaypoints = {
if (count _units > 0) then
{
private _leader = leader _x;
if (owner _x == 2) then
{
(_leader) call blck_fnc_changeToMoveWaypoint;
#ifdef blck_debugMode
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
if !(_x getVariable["blck_simulationStatus",false]) then
{
_x setVariable["blck_simulationStatus",true,true];
_x setVariable["blck_simulationStatus",true];
{
_x enableSimulationGlobal true;
}forEach (units _x);
@ -196,7 +180,7 @@ _fn_simulationMonitor = {
// Be sure simulation is off for all units in the group.
if !(_x getVariable["blck_simulationStatus",true]) then
{
_x setVariable["blck_simulationStatus",false,true];
_x setVariable["blck_simulationStatus",false];
{
_x enableSimulationGlobal false;
}forEach (units _x);

View File

@ -18,7 +18,7 @@ private["_group","_wp","_index","_pattern","_mode","_arc","_dis","_wpPos"];
_group = group _this;
_group setVariable["timeStamp",diag_tickTime,true];
_group setVariable["timeStamp",diag_tickTime];
_group setcombatmode "YELLOW";
_group setBehaviour "COMBAT"
_wp = [_group, 0];
@ -29,7 +29,7 @@ _index = _index + 1;
_minDis = _group getVariable["minDis",0];
_maxDis = _group getVariable["maxDis",0];
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];
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];
};
_group setVariable["wpIndex",_index,true];
_group setVariable["wpIndex",_index];
_type = _pattern select _index;
#ifdef blck_debugMode
@ -60,7 +60,7 @@ if (_type isEqualTo (toLower "move")) then
} else {
_dir = _group getVariable["wpDir",0] + _group getVariable["wpArc",360/5];
};
_group setVariable["wpDir",_dir,true];
_group setVariable["wpDir",_dir];
_oldPos = waypointPosition _wp;
_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"] ];
_wp = [_group, 0];
#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];
};
@ -51,16 +51,16 @@ if !(_soldierType isEqualTo "emplaced") then
_arc = 360/5;
_group setcombatmode "YELLOW";
_group setBehaviour "COMBAT";
_group setVariable["patrolCenter",_pos,true];
_group setVariable["minDis",_minDis,true];
_group setVariable["maxDis",_maxDis,true];
_group setVariable["timeStamp",diag_tickTime,true];
_group setVariable["wpRadius",30,true];
_group setVariable["wpMode",_mode,true];
_group setVariable["wpPatrolMode",_wpPatrolMode,true];
_group setVariable["wpDir",0,true];
_group setVariable["wpArc",_arc,true];
_group setVariable["soldierType",_soldierType,true];
_group setVariable["patrolCenter",_pos];
_group setVariable["minDis",_minDis];
_group setVariable["maxDis",_maxDis];
_group setVariable["timeStamp",diag_tickTime];
_group setVariable["wpRadius",30];
_group setVariable["wpMode",_mode];
_group setVariable["wpPatrolMode",_wpPatrolMode];
_group setVariable["wpDir",0];
_group setVariable["wpArc",_arc];
_group setVariable["soldierType",_soldierType];
_dir = 0;
_wpradius = 30;
@ -80,7 +80,7 @@ if !(_soldierType isEqualTo "emplaced") then
_wp setWaypointStatements ["true","this call blck_fnc_changeToMoveWaypoint;"];
#endif
#ifdef blck_debugMode
if (blck_debugLevel > 2) then
if (blck_debugLevel >= 2) then
{
_marker = createMarker [format["GroupMarker%1",_group],_newPos];
_group setVariable["wpMarker",_marker,true];

View File

@ -38,9 +38,9 @@ _ai1 = ObjNull;
private _modType = call blck_fnc_getModType;
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"];
_ai1 = _aiGroup createUnit ["I_Soldier_EPOCH", _pos, [], blck_baseSkill, "FORM"];
//_ai1 = _aiGroup createUnit ["I_Soldier_EPOCH", _pos, [], blck_baseSkill, "FORM"];
switch(_skillLevel) do
{
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
{
//"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"];
"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"];
switch(_skillLevel) do
{
case "blue":{_ai1 setVariable["ExileMoney",2 + floor(random(blck_maxMoneyBlue)),true];};

View File

@ -58,7 +58,7 @@ if !(isNull _group) then
_unitNumber = _unitNumber + 1;
}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 setBehaviour "COMBAT";
[_center,_minDis,_maxDis,_group,"perimeter","SAD","vehicle"] spawn blck_fnc_setupWaypoints;