Vehicle chance for guerilla forces who approach a sector
Also not yet tested.
This commit is contained in:
parent
6549b75cd9
commit
3188cf1976
|
@ -48,12 +48,13 @@ if (_incDir < 23) then {
|
|||
|
||||
[5, [(markerText _sector), _incString]] remoteExec ["F_cr_globalMsg"];
|
||||
|
||||
private _spawnedGroups = [];
|
||||
private _grp = [_startpos] call F_spawnGuerillaGroup;
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow (leader _grp)} forEach (units _grp);
|
||||
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 100];
|
||||
private _waypoint = _grp addWaypoint [markerpos _sector, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
|
@ -72,20 +73,55 @@ _waypoint = _grp addWaypoint [markerpos _sector, 200];
|
|||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
_spawnedGroups pushBack _grp;
|
||||
|
||||
if ((random 100) <= 25) then {
|
||||
_vehicle = (selectRandom KP_liberation_guerilla_vehicles) createVehicle _startpos;
|
||||
_grp = [_startpos, 2] call F_spawnGuerillaGroup;
|
||||
((units _grp) select 0) moveInDriver _vehicle;
|
||||
((units _grp) select 1) moveInGunner _vehicle;
|
||||
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 300];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 300];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 300];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 300];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
_spawnedGroups pushBack _grp;
|
||||
};
|
||||
|
||||
waitUntil {sleep 60; !(_sector in active_sectors)};
|
||||
|
||||
sleep 60;
|
||||
|
||||
if (!isNull _grp) then {
|
||||
{
|
||||
if (alive _x) then {
|
||||
deleteVehicle _x;
|
||||
KP_liberation_guerilla_strength = KP_liberation_guerilla_strength + 1;
|
||||
};
|
||||
} forEach (units _grp);
|
||||
if (!isServer) then {
|
||||
publicVariableServer "KP_liberation_guerilla_strength";
|
||||
private _strengthChanged = false;
|
||||
|
||||
{
|
||||
if (!isNull _x) then {
|
||||
{
|
||||
if (alive _x) then {
|
||||
deleteVehicle _x;
|
||||
KP_liberation_guerilla_strength = KP_liberation_guerilla_strength + 1;
|
||||
_strengthChanged = true;
|
||||
};
|
||||
} forEach (units _x);
|
||||
};
|
||||
} forEach _spawnedGroups;
|
||||
|
||||
if (!isServer && _strengthChanged) then {
|
||||
publicVariableServer "KP_liberation_guerilla_strength";
|
||||
};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {private _text = format ["[KP LIBERATION] [ASYMMETRIC] Sector %1 (%2) - sector_guerilla dropped on: %3", (markerText _sector), _sector, debug_source];_text remoteExec ["diag_log",2];};
|
||||
|
|
|
@ -14,12 +14,12 @@ Return:
|
|||
GROUP
|
||||
*/
|
||||
|
||||
params ["_pos"];
|
||||
params ["_pos", ["_amount", 0]];
|
||||
|
||||
private _grp = createGroup [GRLIB_side_resistance, true];
|
||||
private _tier = [] call F_getResistanceTier;
|
||||
private _cr_multi = [] call F_cr_getMulti;
|
||||
private _amount = (4 + (round (random _cr_multi)) + (round (random _tier)));
|
||||
if (_amount == 0) then {_amount = (4 + (round (random _cr_multi)) + (round (random _tier)));};
|
||||
private _weapons = missionNamespace getVariable ("KP_liberation_guerilla_weapons_" + str _tier);
|
||||
private _uniforms = missionNamespace getVariable ("KP_liberation_guerilla_uniforms_" + str _tier);
|
||||
private _vests = missionNamespace getVariable ("KP_liberation_guerilla_vests_" + str _tier);
|
||||
|
|
|
@ -163,6 +163,7 @@ class Missions
|
|||
* Added: Group diag output for serverlog.
|
||||
* Added: Debug output for group count and amount of active scripts. Liberation starts with [13,70,0,1].
|
||||
* Added: Notification for incoming guerilla forces when attacking a sector.
|
||||
* Added: Vehicle chance for guerilla forces who approach a sector.
|
||||
* Removed: Some old scripts which aren't needed anymore.
|
||||
* Tweaked: All `spawn compileFinal preprocessFileLineNumbers` replaced with `execVM`.
|
||||
* Tweaked: All `createGroup` now with activated `deleteWhenEmpty`.
|
||||
|
|
Loading…
Reference in New Issue