initial files
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
if ( isDedicated ) exitWith {};
|
||||
|
||||
params [ "_battlegroup_position" ];
|
||||
|
||||
"opfor_bg_marker" setMarkerPosLocal ( markerPos _battlegroup_position );
|
||||
[ "lib_battlegroup", [ markerText ( [ 10000, markerPos _battlegroup_position ] call KPLIB_fnc_getNearestSector ) ] ] call BIS_fnc_showNotification;
|
||||
|
||||
sleep 600;
|
||||
|
||||
"opfor_bg_marker" setMarkerPosLocal markers_reset;
|
||||
@@ -0,0 +1,6 @@
|
||||
player allowDamage false;
|
||||
(vehicle player) allowDamage false;
|
||||
GRLIB_endgame = 1;
|
||||
sleep 20;
|
||||
|
||||
_this call compileFinal preprocessFileLineNumbers "scripts\client\ui\end_screen.sqf";
|
||||
@@ -0,0 +1,30 @@
|
||||
if ( isDedicated ) exitWith {};
|
||||
|
||||
if ( isNil "sector_timer" ) then { sector_timer = 0 };
|
||||
|
||||
params [ "_fob", "_status" ];
|
||||
private [ "_fobname" ];
|
||||
|
||||
_fobname = [_fob] call KPLIB_fnc_getFobName;
|
||||
|
||||
if ( _status == 0 ) then {
|
||||
[ "lib_fob_built", [ _fobname ] ] call BIS_fnc_showNotification;
|
||||
};
|
||||
|
||||
if ( _status == 1 ) then {
|
||||
[ "lib_fob_attacked", [ _fobname ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal _fob;
|
||||
sector_timer = GRLIB_vulnerability_timer;
|
||||
};
|
||||
|
||||
if ( _status == 2 ) then {
|
||||
[ "lib_fob_lost", [ _fobname ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal markers_reset;
|
||||
sector_timer = 0;
|
||||
};
|
||||
|
||||
if ( _status == 3 ) then {
|
||||
[ "lib_fob_safe", [ _fobname ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal markers_reset;
|
||||
sector_timer = 0;
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
if ( isDedicated ) exitWith {};
|
||||
|
||||
params [ "_attack_destination" ];
|
||||
|
||||
if ( isNil "GRLIB_last_incoming_notif_time" ) then { GRLIB_last_incoming_notif_time = -9999 };
|
||||
|
||||
if ( time > GRLIB_last_incoming_notif_time + 60 ) then {
|
||||
|
||||
GRLIB_last_incoming_notif_time = time;
|
||||
|
||||
private [ "_attack_location_name" ];
|
||||
_attack_location_name = [_attack_destination] call KPLIB_fnc_getLocationName;
|
||||
|
||||
[ "lib_incoming", [ _attack_location_name ] ] call BIS_fnc_showNotification;
|
||||
|
||||
private [ "_mrk" ];
|
||||
_mrk = createMarkerLocal [ "opfor_incoming_marker", _attack_destination];
|
||||
"opfor_incoming_marker" setMarkerTypeLocal "selector_selectedMission";
|
||||
"opfor_incoming_marker" setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
|
||||
sleep 250;
|
||||
deleteMarkerLocal _mrk;
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
if (isDedicated) exitWith {};
|
||||
|
||||
params ["_notiftype", ["_obj_position", getpos player]];
|
||||
|
||||
switch (_notiftype) do {
|
||||
case 0: {["lib_intel_prisoner"] call BIS_fnc_showNotification;};
|
||||
case 1: {["lib_intel_document"] call BIS_fnc_showNotification;};
|
||||
case 2: {
|
||||
waitUntil {!isNil "secondary_objective_position_marker"};
|
||||
waitUntil {count secondary_objective_position_marker > 0};
|
||||
waitUntil {secondary_objective_position_marker distance zeropos > 1000};
|
||||
["lib_intel_fob", [markertext ([10000, secondary_objective_position_marker] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
|
||||
_secondary_marker = createMarkerLocal ["secondarymarker", secondary_objective_position_marker];
|
||||
_secondary_marker setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
_secondary_marker setMarkerTypeLocal "hd_unknown";
|
||||
|
||||
_secondary_marker_zone = createMarkerLocal ["secondarymarkerzone", secondary_objective_position_marker];
|
||||
_secondary_marker_zone setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
_secondary_marker_zone setMarkerShapeLocal "ELLIPSE";
|
||||
_secondary_marker_zone setMarkerBrushLocal "FDiagonal";
|
||||
_secondary_marker_zone setMarkerSizeLocal [1500,1500];
|
||||
};
|
||||
case 3: {
|
||||
["lib_secondary_fob_destroyed"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "secondarymarker";
|
||||
deleteMarkerLocal "secondarymarkerzone";
|
||||
secondary_objective_position_marker = [];
|
||||
};
|
||||
case 4: {["lib_intel_convoy", [markertext ([10000, _obj_position] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;};
|
||||
case 5: {["lib_secondary_convoy_destroyed"] call BIS_fnc_showNotification;};
|
||||
case 6: {
|
||||
waitUntil {!isNil "secondary_objective_position_marker"};
|
||||
waitUntil {count secondary_objective_position_marker > 0};
|
||||
waitUntil {secondary_objective_position_marker distance zeropos > 1000};
|
||||
["lib_intel_sar", [markertext ([10000, secondary_objective_position_marker] call KPLIB_fnc_getNearestSector)]] call BIS_fnc_showNotification;
|
||||
_secondary_marker = createMarkerLocal ["secondarymarker", secondary_objective_position_marker];
|
||||
_secondary_marker setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
_secondary_marker setMarkerTypeLocal "hd_unknown";
|
||||
|
||||
_secondary_marker_zone = createMarkerLocal ["secondarymarkerzone", secondary_objective_position_marker];
|
||||
_secondary_marker_zone setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
_secondary_marker_zone setMarkerShapeLocal "ELLIPSE";
|
||||
_secondary_marker_zone setMarkerBrushLocal "FDiagonal";
|
||||
_secondary_marker_zone setMarkerSizeLocal [1500,1500];
|
||||
};
|
||||
case 7: {
|
||||
["lib_intel_sar_failed"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "secondarymarker";
|
||||
deleteMarkerLocal "secondarymarkerzone";
|
||||
secondary_objective_position_marker = [];
|
||||
};
|
||||
case 8: {
|
||||
["lib_intel_sar_succeeded"] call BIS_fnc_showNotification;
|
||||
deleteMarkerLocal "secondarymarker";
|
||||
deleteMarkerLocal "secondarymarkerzone";
|
||||
secondary_objective_position_marker = [];
|
||||
};
|
||||
default {[format ["remote_call_intel.sqf -> no valid value for _notiftype: %1", _notiftype], "ERROR"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
@@ -0,0 +1,86 @@
|
||||
params [ "_unit" ];
|
||||
private [ "_nearestfob", "_is_near_fob", "_is_near_blufor", "_grp", "_waypoint", "_nearblufor" ];
|
||||
|
||||
waitUntil {
|
||||
sleep 0.5;
|
||||
local _unit
|
||||
};
|
||||
|
||||
_is_near_fob = false;
|
||||
_is_near_blufor = true;
|
||||
|
||||
sleep 1;
|
||||
_unit playmove "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||
sleep 2;
|
||||
_unit enableAI "ANIM";
|
||||
_unit enableAI "MOVE";
|
||||
sleep 2;
|
||||
[_unit, ""] remoteExecCall ["switchMove"];
|
||||
|
||||
if ( typeof _unit == pilot_classname ) exitWith {};
|
||||
|
||||
waitUntil { sleep 5;
|
||||
|
||||
_nearestfob = [ getpos _unit ] call KPLIB_fnc_getNearestFob;
|
||||
if ( count _nearestfob == 3) then {
|
||||
if ( ( _unit distance _nearestfob ) < 30 ) then {
|
||||
_is_near_fob = true;
|
||||
};
|
||||
};
|
||||
|
||||
_is_near_blufor = false;
|
||||
if ( !_is_near_blufor ) then {
|
||||
{
|
||||
if ((_x distance _unit) < 100) exitWith { _is_near_blufor = true };
|
||||
} forEach (allUnits select {!((toLower (typeof _x)) in KPLIB_o_inf_classes || (typeof _x) in militia_squad)});
|
||||
};
|
||||
|
||||
!alive _unit || !(_is_near_blufor) || (_is_near_fob && (vehicle _unit == _unit))
|
||||
};
|
||||
|
||||
if (alive _unit) then {
|
||||
|
||||
if (_is_near_fob) then {
|
||||
|
||||
sleep 5;
|
||||
_grp = createGroup [GRLIB_side_civilian, true];
|
||||
[_unit] joinSilent _grp;
|
||||
_unit playmove "AmovPercMstpSnonWnonDnon_AmovPsitMstpSnonWnonDnon_ground";
|
||||
_unit disableAI "ANIM";
|
||||
_unit disableAI "MOVE";
|
||||
sleep 5;
|
||||
[_unit, "AidlPsitMstpSnonWnonDnon_ground00"] remoteExecCall ["switchMove"];
|
||||
[_unit] remoteExec ["prisonner_remote_call",2];
|
||||
sleep 600;
|
||||
deleteVehicle _unit;
|
||||
|
||||
} else {
|
||||
|
||||
_grp = createGroup [GRLIB_side_enemy, true];
|
||||
[_unit] joinSilent _grp;
|
||||
_unit setUnitPos "AUTO";
|
||||
_unit setCaptive false;
|
||||
|
||||
if ((vehicle _unit != _unit) && !(_unit isEqualTo (driver vehicle _unit))) then {
|
||||
unAssignVehicle _unit;
|
||||
_unit action ["eject", vehicle _unit];
|
||||
_unit action ["getout", vehicle _unit];
|
||||
unAssignVehicle _unit;
|
||||
};
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
_possible_sectors = (sectors_allSectors - blufor_sectors);
|
||||
if ( count _possible_sectors > 0 ) then {
|
||||
|
||||
_possible_sectors = [ _possible_sectors , [getpos _unit, 5000] , { (markerPos _x) distance _input0 } , 'ASCEND' ] call BIS_fnc_sortBy;
|
||||
if ( count _possible_sectors > 0 ) then {
|
||||
_target_sector = _possible_sectors select 0;
|
||||
_waypoint = _grp addWaypoint [markerpos _target_sector, 300];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
if ( isDedicated ) exitWith {};
|
||||
|
||||
if ( isNil "sector_timer" ) then { sector_timer = 0 };
|
||||
|
||||
params [ "_sector", "_status" ];
|
||||
|
||||
if ( _status == 0 ) then {
|
||||
[ "lib_sector_captured", [ markerText _sector ] ] call BIS_fnc_showNotification;
|
||||
};
|
||||
|
||||
if ( _status == 1 ) then {
|
||||
[ "lib_sector_attacked", [ markerText _sector ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal ( markerpos _sector );
|
||||
sector_timer = GRLIB_vulnerability_timer;
|
||||
};
|
||||
|
||||
if ( _status == 2 ) then {
|
||||
[ "lib_sector_lost", [ markerText _sector ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal markers_reset;
|
||||
sector_timer = 0;
|
||||
};
|
||||
|
||||
if ( _status == 3 ) then {
|
||||
[ "lib_sector_safe", [ markerText _sector ] ] call BIS_fnc_showNotification;
|
||||
"opfor_capture_marker" setMarkerPosLocal markers_reset;
|
||||
sector_timer = 0;
|
||||
};
|
||||
|
||||
{ _x setMarkerColorLocal GRLIB_color_enemy; } foreach (sectors_allSectors - blufor_sectors);
|
||||
{ _x setMarkerColorLocal GRLIB_color_friendly; } foreach blufor_sectors;
|
||||
Reference in New Issue
Block a user