Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Cordon and Kick for ARMA 3 KP Liberation
- // by xhrit
- // v0.1
- //
- // this secondary objective sends you to the location of a suspected
- // terror cell operating in an allied city and tasks you
- // to recover evidence relating to their operations
- // it should cost influence to start, and reward ammo or intel if successful
- // added mission to Missionframework/scripts/client/ui/secondary_ui.sqf
- // added mission text to MissionFramework/stringtable.xml for STR_SECONDARY_MISSION3, STR_SECONDARY_BRIEFING3, STR_SECONDARY_CORDON_AND_KICK
- // STR_NOTIFICATION_CAK_STARTED, STR_NOTIFICATION_CAK_FAILED, STR_NOTIFICATION_CAK_SUCCESS
- // added mission cost to GRLIB_secondary_missions_costs in MissionFramework/kp_liberation_confir.sqf
- // added mission thumbnail to res/secondary/cordon_and_kick.jpg
- // added mission to init_server.sqf
- // added mission to start_secondary_remote_call.sqf
- // added lib_intel_sar_succeeded to liberation_notifications.hpp
- // TODO : add case 9 and 10 to remote_call_intel
- // TODO : adjust mission starting cost & reward
- diag_log "[KP LIBERATION] [DEBUG] begin cordon and kick mission";
- // get random blue sector
- _allBluesectors = blufor_sectors;
- if (count blufor_sectors == 0) exitWith { diag_log "[KP LIBERATION] [ERROR] Could not select a blufor sector."; };
- _rndBluesector = selectRandom _allBluesectors;
- // get random house in city
- private _allBuildings = nearestTerrainObjects [markerpos _rndBluesector, [], 250, false, true] select { !(_x buildingPos -1 isEqualTo []) };
- if (count _allBuildings == 0) exitWith { diag_log "[KP LIBERATION] [ERROR] Could not select a house in selected blufor sector."; };
- _rndBuilding = selectRandom _allBuildings;
- // _buildingposition = selectRandom (_rndBuilding buildingPos -1);
- // get random position inside house
- _buildingpositions = [_rndBuilding] call BIS_fnc_buildingPositions;
- if (count _buildingpositions == 0) exitWith { diag_log "[KP LIBERATION] [ERROR] Could not select a position in selected house."; };
- _buildingposition = selectRandom _buildingpositions;
- _dir = direction _rndBuilding;
- // spawn intel in house
- private _intelobject = (selectRandom [GRLIB_intel_file, GRLIB_intel_laptop]) createVehicle _buildingposition;
- _intelobject setPosATL [_buildingposition select 0, _buildingposition select 1, (_buildingposition select 2) - 0.15];
- _intelobject enableSimulationGlobal false;
- _intelobject allowDamage false;
- _intelobject setdir ( _dir );
- // spawn terror cell to defend it
- private _grp = [ position _rndBuilding ] call F_spawnGuerillaGroup;
- // chance to spawn IEDs on nearby roads
- _ieds = 1 + random 5;
- diag_log "[KP LIBERATION] [CORDON_AND_KICK] Spawnining %1 ieds", _ieds;
- [_rndBluesector, _ieds] spawn manage_asymIED;
- // TODO: chance to spawn a number of ambushes in a different building in town
- // [_rndBluesector] spawn asym_sector_ambush;
- // TODO: chance to spawn terror patrols in tacticals on outskirts of town
- // TODO: chance to spawn reinforcements
- // spawn markers and flag mission as in-progress
- secondary_objective_position = position _rndBuilding;
- secondary_objective_position_marker = [(((secondary_objective_position select 0) + 50) - random 100),(((secondary_objective_position select 1) + 50) - random 100),0];
- publicVariable "secondary_objective_position_marker";
- sleep 1;
- GRLIB_secondary_in_progress = 3; publicVariable "GRLIB_secondary_in_progress";
- _mission_in_progress = true;
- [9] remoteExec ["remote_call_intel"];
- // track mission end
- while { _mission_in_progress } do {
- // victory condition 1 : terror cell is destroyed
- if ( count (units _grp) < 1 ) then {
- _mission_in_progress = false;
- [10] remoteExec ["remote_call_intel"];
- };
- // TODO: mission fail conditions
- // terror cell should have a chance to try and escape if more then half are dead
- // if the cell moves far enough away from the city, the mission should fail.
- // also the intel should be destructable, and if lost then the mission should fail.
- };
- diag_log "[KP LIBERATION] [DEBUG] end cordon and kick mission";
- // give reward and clear quest marker
- sleep 20;
- deleteMarker _cell_marker;
- // combat_readiness = round (combat_readiness * 0.85);
- stats_secondary_objectives = stats_secondary_objectives + 1;
- // [10] remoteExec ["remote_call_intel"];
- GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement