A few more bug fixes; reverted heli waypoints to that of build 46.

This commit is contained in:
Ghostrider-DbD- 2017-04-13 00:07:41 -04:00
parent 12e8da662d
commit 757fd07fdc
5 changed files with 68 additions and 31 deletions

View File

@ -1,6 +1,6 @@
/* /*
by Ghostrider by Ghostrider
1-22-17 4-12-17
-------------------------- --------------------------
License License
-------------------------- --------------------------
@ -18,7 +18,6 @@ _legal = true;
_fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equiped _fn_targetVehicle = { // force AI to fire on the vehicle with launchers if equiped
params["_vk","_unit"]; params["_vk","_unit"];
private
{ {
if (((position _x) distance (position _unit)) <= 350) then if (((position _x) distance (position _unit)) <= 350) then
{ {

View File

@ -33,9 +33,9 @@ _helis = _this select 5;
5) return the _heli that was spawned. 5) return the _heli that was spawned.
*/ */
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then if (blck_debugLevel > 0) then
{ {
diag_log format["_fnc_spawnMissionHeli (75):: _helis = %1",_helis]; diag_log format["_fnc_spawnMissionHeli (38):: _helis = %1",_helis];
}; };
#endif #endif
@ -54,7 +54,7 @@ if (isNull _grpParatroops) then
diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpParatroops"; diag_log "BLCK_ERROR: _fnc_spawnMissionHeli::_->> NULL GROUP Returned for _grpParatroops";
_abort = true; _abort = true;
}; };
if !(isNull _grpPilot) then if (!(isNull _grpPilot) && !(isNull _grpParatroops)) then
{ {
_grpPilot setBehaviour "COMBAT"; _grpPilot setBehaviour "COMBAT";
_grpPilot setCombatMode "RED"; _grpPilot setCombatMode "RED";
@ -73,9 +73,9 @@ if !(isNull _grpPilot) then
_chopperType = selectRandom _helis; _chopperType = selectRandom _helis;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionHeli (66):: _chopperType seleted = %1",_chopperType]; diag_log format["_fnc_spawnMissionHeli (78):: _chopperType seleted = %1",_chopperType];
}; };
#endif #endif
@ -88,16 +88,13 @@ if !(isNull _grpPilot) then
_patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}]; _patrolHeli addEventHandler ["GetOut",{(_this select 0) setFuel 0;(_this select 0) setDamage 1;}];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionHeli (76):: heli %1 spawned",_patrolHeli]; diag_log format["_fnc_spawnMissionHeli (93):: heli %1 spawned",_patrolHeli];
}; };
#endif #endif
clearWeaponCargoGlobal _patrolHeli; [_patrolHeli] call blck_fnc_emptyObject;
clearMagazineCargoGlobal _patrolHeli;
clearItemCargoGlobal _patrolHeli;
clearBackpackCargoGlobal _patrolHeli;
_launcherType = "none"; _launcherType = "none";
_unitPilot = _grpPilot createUnit ["I_helipilot_F", getPos _patrolHeli, [], 0, "FORM"]; _unitPilot = _grpPilot createUnit ["I_helipilot_F", getPos _patrolHeli, [], 0, "FORM"];
@ -108,16 +105,16 @@ if !(isNull _grpPilot) then
_grpPilot selectLeader _unitPilot; _grpPilot selectLeader _unitPilot;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionHeli (90):: pilot %1 spawned",_unitPilot]; diag_log format["_fnc_spawnMissionHeli (113):: pilot %1 spawned",_unitPilot];
}; };
#endif #endif
_turrets = allTurrets [_patrolHeli,false]; _turrets = allTurrets [_patrolHeli,false];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log "_fnc_spawnMissionHeli (103): preparing to clear out blacklisted turrets"; diag_log "_fnc_spawnMissionHeli (103): preparing to clear out blacklisted turrets";
}; };
@ -133,7 +130,7 @@ if !(isNull _grpPilot) then
_patrolHeli removeMagazines [_x,_turret]; _patrolHeli removeMagazines [_x,_turret];
} forEach _mags; } forEach _mags;
_patrolHeli removeWeaponTurret _turret; _patrolHeli removeWeaponTurret _turret;
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionHeli (118)::-->> weapon %1 and its ammo removed from heli %2 for turret %3",_patrolHeli weaponsTurret _x,_patrolHeli, _x]; diag_log format["_fnc_spawnMissionHeli (118)::-->> weapon %1 and its ammo removed from heli %2 for turret %3",_patrolHeli weaponsTurret _x,_patrolHeli, _x];
}; };
@ -141,7 +138,7 @@ if !(isNull _grpPilot) then
else else
{ {
// B_helicrew_F // B_helicrew_F
_unitCrew = [[100,100,100],_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI; _unitCrew = [(getPosATL _patrolHeli),_weapons,_grpPilot,_skillAI,_launcherType,_uniforms,_headGear] call blck_fnc_spawnAI;
_unitCrew assignAsTurret [_patrolHeli, _x]; _unitCrew assignAsTurret [_patrolHeli, _x];
_unitCrew moveInTurret [_patrolHeli, _x]; _unitCrew moveInTurret [_patrolHeli, _x];
@ -152,7 +149,7 @@ if !(isNull _grpPilot) then
}forEach _turrets; }forEach _turrets;
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionHeli (133)::-->> Heli %1 outfited with a crew numbering %2",_patrolHeli, crew _patrolHeli]; diag_log format["_fnc_spawnMissionHeli (133)::-->> Heli %1 outfited with a crew numbering %2",_patrolHeli, crew _patrolHeli];
}; };
@ -166,12 +163,38 @@ if !(isNull _grpPilot) then
}; };
//set waypoint for helicopter //set waypoint for helicopter
private["_wpDestination"]; private["_dir","_arc","_noWp","_wpradius","_newPos","_wp","_pos"];
//set waypoint for helicopter //set waypoint for helicopter
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
[_coords,2,10,_grpPilot,"random",["SENTRY"]] call blck_fnc_setupWaypoints; _dir = 0;
_arc = 30;
_noWp = 1;
_wpradius = 30;
_wp = [_grpPilot, 0];
_pos = getWPPos _wp;
_newPos = _pos getPos [(_minDis+(random (_maxDis - _minDis))), _dir];
/* #ifdef wpModeMove
_wp setWaypointType "MOVE";
_wp setWaypointName "move";
_wp setWaypointTimeout [1,1.1,1.2];
_wp setWaypointStatements ["true","this call blck_fnc_setNextWaypoint;diag_log format['====Updating waypoint to for group %1',group this];"];
#else
_wp setWaypointType "SAD";
_wp setWaypointName "sad";
_wp setWaypointTimeout [20,25,30];
_wp setWaypointStatements ["true","this call blck_fnc_setNextWaypoint;diag_log format['====Updating waypointfor group %1',group this];"];
#endif
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
//_wp setWaypointTimeout [1,1.1,1.2];
_grpPilot setCurrentWaypoint _wp;
// params["_pos","_minDis","_maxDis","_group",["_mode","random"],["_pattern",["MOVE","SAD"]]];
//[_coords,2,10,_grpPilot,"random",["SENTRY"]] call blck_fnc_setupWaypoints;
/*
_grpPilot setVariable["patrolCenter",_coords]; _grpPilot setVariable["patrolCenter",_coords];
_grpPilot setVariable["minDis",10]; _grpPilot setVariable["minDis",10];
_grpPilot setVariable["maxDis",25]; _grpPilot setVariable["maxDis",25];
@ -202,7 +225,7 @@ if !(isNull _grpPilot) then
_wp setWaypointBehaviour blck_groupBehavior; _wp setWaypointBehaviour blck_groupBehavior;
_wp setWaypointCombatMode blck_combatMode; _wp setWaypointCombatMode blck_combatMode;
_grpPilot setCurrentWaypoint _wp; _grpPilot setCurrentWaypoint _wp;
*/ */
/* /*
for "_i" from 1 to 5 do for "_i" from 1 to 5 do
{ {
@ -231,9 +254,19 @@ if !(isNull _grpPilot) then
*/ */
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 2) then if (blck_debugLevel > 1) then
{ {
diag_log format["_fnc_spawnMissionHeli (153):: initial pilot waypoints set"]; diag_log format["_fnc_spawnMissionHeli (153):: initial pilot waypoints set"];
[_patrolHeli] spawn {
params["_patrolHeli"];
diag_log "_fnc_spawnMissionHeli:-> spawning crew monitoring loop";
while {!isNull _patrolHeli} do
{
uiSleep 10;
diag_log format["_fnc_spawnMissionHeli:-> heli %1 has %2 crew alive",_patrolHeli, {alive _x} count crew _patrolHeli];
diag_log format["_fnc_spawnMissionHeli:-> heli %1 fullCrew = %2",_patrolHeli, fullCrew _patrolHeli];
};
};
}; };
#endif #endif
@ -243,7 +276,7 @@ _ai = (units _grpParatroops) + (units _grpPilot);
_return = [_patrolHeli,_ai,_abort]; _return = [_patrolHeli,_ai,_abort];
#ifdef blck_debugMode #ifdef blck_debugMode
if (blck_debugLevel > 1) then if (blck_debugLevel > 0) then
{ {
diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return]; diag_log format["_fnc_spawnMissionHeli:: function returning value for _return of %1",_return];
}; };

View File

@ -4,14 +4,15 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
Contributions by Narines: bug fixes, testing, infinite ammo fix. Contributions by Narines: bug fixes, testing, infinite ammo fix.
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
4/6/17 Version 6.58 Build 53 4/6/17 Version 6.58 Build 54
[Added] A FAQ presenting an overview of the mission system and addons. [Added] A FAQ presenting an overview of the mission system and addons.
[Changed] Helicopter crew reverted to that from Build 46. [Changed] Helicopter crew waypoint system reverted to that from Build 46.
[Fixed] Mission timouts would prevent new missions from spawning after a while. [Fixed] Mission timouts would prevent new missions from spawning after a while.
[Fixed] blck_timeAcceleration now determines if time acceleration is activated. [Fixed] blck_timeAcceleration now determines if time acceleration is activated.
[Fixed] Missions did not complete correctly under certain circumstances. [Fixed] Missions did not complete correctly under certain circumstances.
[Fixed] Mission vehicles were not properly deleted, unlocked or otherwise handled at misison end or when AI crew were killed. [Fixed] Mission vehicles were not properly deleted, unlocked or otherwise handled at misison end or when AI crew were killed.
[Issues] Throws errors when evaluating errors related to certain disallowed types of kills. [Fixed] Throws errors when evaluating errors related to certain disallowed types of kills.
Known errors: throws errors with certain loot crate setups (Exile)
3/23/17 Verision 6.58 build 48 3/23/17 Verision 6.58 build 48
Turned debugging off Turned debugging off

View File

@ -1,6 +1,6 @@
Blckegls mission system Ver 6.58 Blckegls mission system Ver 6.58
Build 53 Build 54
Included is an updated version of blckeagls mission system. This began as an effort to fix bugs in and upgrade version 2.0.2 as updated by Narines and has now evolved to a complete reworking of almost all code. Included is an updated version of blckeagls mission system. This began as an effort to fix bugs in and upgrade version 2.0.2 as updated by Narines and has now evolved to a complete reworking of almost all code.

View File

@ -4,11 +4,15 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2
Contributions by Narines: bug fixes, testing, infinite ammo fix. Contributions by Narines: bug fixes, testing, infinite ammo fix.
Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. Ideas or code from that by Vampire and KiloSwiss have been used for certain functions.
4/6/17 Version 6.58 Build 50 4/6/17 Version 6.58 Build 54
[Added] A FAQ presenting an overview of the mission system and addons. [Added] A FAQ presenting an overview of the mission system and addons.
[Changed] Helicopter crew waypoint system reverted to that from Build 46.
[Fixed] Mission timouts would prevent new missions from spawning after a while. [Fixed] Mission timouts would prevent new missions from spawning after a while.
[Fixed] blck_timeAcceleration now determines if time acceleration is activated. [Fixed] blck_timeAcceleration now determines if time acceleration is activated.
[Fixed] Missions did not complete correctly under certain circumstances. [Fixed] Missions did not complete correctly under certain circumstances.
[Fixed] Mission vehicles were not properly deleted, unlocked or otherwise handled at misison end or when AI crew were killed.
[Fixed] Throws errors when evaluating errors related to certain disallowed types of kills.
Known errors: throws errors with certain loot crate setups (Exile)
3/23/17 Verision 6.58 build 48 3/23/17 Verision 6.58 build 48
Turned debugging off Turned debugging off