Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions description.ext
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ class CfgRemoteExec
class supplyDrop {};
class support {};
class airStrike {};
class pawneeCas {};
class ghostHawkCas {};
class blackfootCas {};
class ragePack {};
class say3DGlobal {};
class createBlur {};
Expand Down
21 changes: 12 additions & 9 deletions editMe.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,18 @@ HOSTILE_ARMOUR_POINT_SCORE = 4;
/* Comment out or delete the below support items to prevent the player from buying them */

BULWARK_SUPPORTITEMS = [
[800, "Recon UAV", "reconUAV"],
[1680, "Emergency Teleport", "telePlode"],
[1950, "Paratroopers", "paraDrop"],
[3850, "Missile CAS", "airStrike"],
[4220, "Mine Cluster Shell", "mineField"],
[4690, "Rage Stimpack", "ragePack"],
[5930, "Mind Control Gas", "mindConGas"],
[6666, "ARMAKART TM", "armaKart"],
[7500, "Predator Drone", "droneControl"]
[800, "Recon UAV", "reconUAV"],
[1680, "Emergency Teleport", "telePlode"],
[1950, "Paratroopers", "paraDrop"],
[3850, "Missile CAS", "airStrike"],
[4220, "Mine Cluster Shell", "mineField"],
[4690, "Rage Stimpack", "ragePack"],
[5000, "Helicopter CAS (Pawnee)", "pawneeCas"],
[5930, "Mind Control Gas", "mindConGas"],
[6666, "ARMAKART TM", "armaKart"],
[7500, "Helicopter CAS (Ghost Hawk)", "ghostHawkCas"],
[7500, "Predator Drone", "droneControl"],
[10000, "Helicopter CAS (Blackfoot)", "blackfootCas"]
];

/* Objects the Player can buy */
Expand Down
3 changes: 3 additions & 0 deletions score/functions/fn_support.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ switch (_type) do {
case ("airStrike"): {
[_player, _target, _aircraft] call supports_fnc_airStrike;
};
case ("heliCas"): {
[_player, _aircraft] call supports_fnc_heliCas;
};
case ("ragePack"): {
// Ragepack is a local effect so it needs to be executed locally
[] remoteExec ["supports_fnc_ragePack", _player];
Expand Down
33 changes: 33 additions & 0 deletions supports/CommunicationMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,39 @@ class airStrike
removeAfterExpressionCall = 1;
};

class pawneeCas
{
text = "Helicopter CAS (Pawnee)";
submenu = "";
expression = "[_this select 0, _this select 1, 'heliCas', 'B_Heli_Light_01_dynamicLoadout_F'] remoteExec ['killPoints_fnc_support', 2];";
icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\cas_ca.paa";
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa";
enable = "1";
removeAfterExpressionCall = 1;
};

class ghostHawkCas
{
text = "Helicopter CAS (Ghost Hawk)";
submenu = "";
expression = "[_this select 0, _this select 1, 'heliCas', 'B_Heli_Transport_01_F'] remoteExec ['killPoints_fnc_support', 2];";
icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\cas_ca.paa";
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa";
enable = "1";
removeAfterExpressionCall = 1;
};

class blackfootCas
{
text = "Helicopter CAS (Blackfoot)";
submenu = "";
expression = "[_this select 0, _this select 1, 'heliCas', 'B_Heli_Attack_01_dynamicLoadout_F'] remoteExec ['killPoints_fnc_support', 2];";
icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\cas_ca.paa";
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa";
enable = "1";
removeAfterExpressionCall = 1;
};

class ragePack
{
text = "Rage Stimpack";
Expand Down
1 change: 1 addition & 0 deletions supports/Functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class supports
class paraTroop {};
class reconUAV {};
class airStrike {};
class heliCas {};
class ragePack {};
class armaKart {};
class mindConGas {};
Expand Down
46 changes: 46 additions & 0 deletions supports/functions/fn_heliCas.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* fn_heliCas
*
* Calls Helicopter CAS to provide support
*
* Domain: Server
**/
params ["_player", "_aircraft"];

/**
I DID NOT CREATE A CLENUP FUNCTION FOR THIS SUPPORT
ALSO, YOU MAY WANT TO MAKE A TIME LIMIT FOR THIS SUPPORT. IT IS A BIT OP
**/

// Spawn CAS
_position = [[[position _player, 3500]],[]] call BIS_fnc_randomPos;
_veh = createVehicle [_aircraft,_position, [], 0, "FLY"];
createVehicleCrew _veh;
_gunner = gunner _veh;

_wp = (group _veh) addWaypoint [position _player, 0];
_wp setWaypointCombatMode "RED";
_wp setWaypointType "SAD";

while {alive _player && alive _gunner} do {

{
_knownByPilot = (_gunner targetKnowledge _x) select 0;
_knownByPlayer = (_player targetKnowledge _x) select 0;

if(!_knownByPilot && _knownByPlayer) then {
(group _gunner) reveal [_x, (_player knowsAbout _x)];
};
if(_knownByPilot && !_knownByPlayer) then {
(group _player) reveal [_x, (_gunner knowsAbout _x)];
};
}
forEach allUnits;

sleep 3;
if(isNull assignedTarget _gunner) then {
_wp = (group _veh) addWaypoint [position _player, 0];
_wp setWaypointCombatMode "RED";
_wp setWaypointType "SAD";
};
};