mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into IEDSupport
This commit is contained in:
commit
e592f233f3
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@ -0,0 +1,13 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
[missionNamespace, "playerChanged", {_this call AGM_Captives_fnc_handlePlayerChanged}] call AGM_Core_fnc_addCustomEventhandler;
|
@ -1,363 +0,0 @@
|
||||
class CfgPatches {
|
||||
class AGM_Captives {
|
||||
units[] = {};
|
||||
weapons[] = {"AGM_CableTie"};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {AGM_Core, AGM_Interaction};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"commy2", "KoffeinFlummi"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class AGM_Captives {
|
||||
class AGM_Captives {
|
||||
file = "\AGM_Captives\functions";
|
||||
class canFriskPerson;
|
||||
class canLoadCaptive;
|
||||
class canUnloadCaptive;
|
||||
class escortCaptive;
|
||||
class handleGetOut;
|
||||
class handleKnockedOut;
|
||||
class handlePlayerChanged;
|
||||
class handleWokeUp;
|
||||
class initPost;
|
||||
class initUnit;
|
||||
class loadCaptive;
|
||||
class openFriskMenu;
|
||||
class setCaptive;
|
||||
class surrender;
|
||||
class unloadCaptive;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//release escorted captive when entering a vehicle
|
||||
class Extended_GetIn_EventHandlers {
|
||||
class All {
|
||||
class AGM_Captives_AutoDetachCaptive {
|
||||
getIn = "if (local (_this select 2) && {(_this select 2) getVariable ['AGM_isEscorting', false]}) then {(_this select 2) setVariable ['AGM_isEscorting', false, true]}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//reset captive animation after leaving vehicle
|
||||
class Extended_GetOut_EventHandlers {
|
||||
class All {
|
||||
class AGM_Captives_LeaveVehicle {
|
||||
getOut = "if (local (_this select 2) && {(_this select 2) getVariable ['AGM_isCaptive', false]}) then {_this call AGM_Captives_fnc_handleGetOut}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//reset captivity and escorting status when getting killed
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
class AGM_Captives_AutoDetachCaptive {
|
||||
killed = "if ((_this select 0) getVariable ['AGM_isCaptive', false]) then {(_this select 0) setVariable ['AGM_isCaptive', false, true]}; if ((_this select 0) getVariable ['AGM_isEscorting', false]) then {(_this select 0) setVariable ['AGM_isEscorting', false, true]};";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//handle captive and unconsciousness state
|
||||
class Extended_Init_EventHandlers {
|
||||
class CAManBase {
|
||||
class AGM_Captives_AutoDetachCaptive {
|
||||
init = "_this call AGM_Captives_fnc_initUnit";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//mission start
|
||||
class Extended_InitPost_EventHandlers {
|
||||
class CAManBase {
|
||||
class AGM_Captives_InitPost {
|
||||
init = "if (local (_this select 0)) then {_this call AGM_Captives_fnc_initPost};";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class AGM_Captives {
|
||||
clientInit = "call compile preprocessFileLineNumbers '\AGM_Captives\clientInit.sqf'";
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Core_canInteractConditions {
|
||||
class AGM_Interaction_isNotEscorting {
|
||||
condition = "!(_player getVariable ['AGM_isEscorting', false])";
|
||||
};
|
||||
class AGM_Interaction_isNotCaptive {
|
||||
condition = "!(_player getVariable ['AGM_isCaptive', false])";
|
||||
};
|
||||
class AGM_Interaction_isNotSurrendering {
|
||||
condition = "!(_player getVariable ['AGM_isSurrender', false])";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class AGM_Actions {
|
||||
class AGM_SetCaptive {
|
||||
displayName = "$STR_AGM_Captives_SetCaptive";
|
||||
distance = 4;
|
||||
condition = "'AGM_CableTie' in items _player && {alive _target} && {!(_target getVariable ['AGM_isCaptive', false])}";
|
||||
statement = "player removeItem 'AGM_CableTie'; [_target, true] call AGM_Captives_fnc_setCaptive";
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = "\AGM_Captives\UI\handcuff_ca.paa";
|
||||
hotkey = "C";
|
||||
};
|
||||
class AGM_ReleaseCaptive {
|
||||
displayName = "$STR_AGM_Captives_ReleaseCaptive";
|
||||
distance = 4;
|
||||
condition = "_target getVariable ['AGM_isCaptive', false] && {isNull (attachedTo _target)}";
|
||||
statement = "[_target, false] call AGM_Captives_fnc_setCaptive";
|
||||
exceptions[] = {"AGM_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = "\AGM_Captives\UI\handcuff_ca.paa";
|
||||
hotkey = "R";
|
||||
};
|
||||
class AGM_EscortCaptive {
|
||||
displayName = "$STR_AGM_Captives_EscortCaptive";
|
||||
distance = 4;
|
||||
condition = "_target getVariable ['AGM_isCaptive', false] && {isNull (attachedTo _target)} && {alive _target} && {!(_target getVariable ['AGM_isUnconscious', false])}";
|
||||
statement = "[_target, true] call AGM_Captives_fnc_escortCaptive";
|
||||
exceptions[] = {"AGM_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
icon = "\AGM_Captives\UI\captive_ca.paa";
|
||||
priority = 2.3;
|
||||
hotkey = "E";
|
||||
};
|
||||
class AGM_StopEscorting {
|
||||
displayName = "$STR_AGM_Captives_StopEscorting";
|
||||
distance = 4;
|
||||
condition = "_target getVariable ['AGM_isCaptive', false] && {_target in attachedObjects _player}";
|
||||
statement = "[_target, false] call AGM_Captives_fnc_escortCaptive";
|
||||
exceptions[] = {"AGM_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
icon = "\AGM_Captives\UI\captive_ca.paa";
|
||||
priority = 2.3;
|
||||
hotkey = "E";
|
||||
};
|
||||
class AGM_LoadCaptive {
|
||||
displayName = "$STR_AGM_Captives_LoadCaptive";
|
||||
distance = 4;
|
||||
condition = "[_player, _target, objNull] call AGM_Captives_fnc_canLoadCaptive";
|
||||
statement = "[_player, _target, objNull] call AGM_Captives_fnc_loadCaptive";
|
||||
exceptions[] = {"AGM_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
icon = "\AGM_Captives\UI\captive_ca.paa";
|
||||
priority = 2.2;
|
||||
hotkey = "L";
|
||||
};
|
||||
class AGM_FriskPerson {
|
||||
displayName = "$STR_AGM_Captives_FriskPerson";
|
||||
distance = 2;
|
||||
condition = "[_player, _target] call AGM_Captives_fnc_canFriskPerson";
|
||||
statement = "[_player, _target] call AGM_Captives_fnc_openFriskMenu";
|
||||
showDisabled = 0;
|
||||
//icon = ""; //@todo
|
||||
priority = 3;
|
||||
hotkey = "F";
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_SelfActions {
|
||||
class AGM_StopEscortingSelf {
|
||||
displayName = "$STR_AGM_Captives_StopEscorting";
|
||||
condition = "(_player getVariable ['AGM_escortedUnit', objNull]) getVariable ['AGM_isCaptive', false] && {(_player getVariable ['AGM_escortedUnit', objNull]) in attachedObjects _player}";
|
||||
statement = "[_player getVariable ['AGM_escortedUnit', objNull], false] call AGM_Captives_fnc_escortCaptive;";
|
||||
exceptions[] = {"AGM_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
priority = 2.3;
|
||||
hotkey = "C";
|
||||
};
|
||||
/*class AGM_LoadCaptiveSelf {
|
||||
displayName = "$STR_AGM_Captives_LoadCaptive";
|
||||
condition = "[_player, objNull, objNull] call AGM_Captives_fnc_canLoadCaptiveIntoVehicle";
|
||||
statement = "[_player, objNull, objNull] call AGM_Captives_fnc_loadCaptiveIntoVehicle";
|
||||
exceptions[] = {"AGM_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
priority = 2.2;
|
||||
hotkey = "K";
|
||||
};*/
|
||||
};
|
||||
};
|
||||
|
||||
#define MACRO_LOADUNLOADCAPTIVE \
|
||||
class AGM_Actions { \
|
||||
class AGM_LoadCaptive { \
|
||||
displayName = "$STR_AGM_Captives_LoadCaptive"; \
|
||||
distance = 4; \
|
||||
condition = "[_player, objNull, _target] call AGM_Captives_fnc_canLoadCaptive"; \
|
||||
statement = "[_player, objNull, _target] call AGM_Captives_fnc_loadCaptive"; \
|
||||
exceptions[] = {"AGM_Interaction_isNotEscorting"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 1.2; \
|
||||
hotkey = "L"; \
|
||||
}; \
|
||||
class AGM_UnloadCaptive { \
|
||||
displayName = "$STR_AGM_Captives_UnloadCaptive"; \
|
||||
distance = 4; \
|
||||
condition = "[_player, _target] call AGM_Captives_fnc_canUnloadCaptive"; \
|
||||
statement = "[_player, _target] call AGM_Captives_fnc_unloadCaptive"; \
|
||||
showDisabled = 0; \
|
||||
priority = 1.2; \
|
||||
hotkey = "C"; \
|
||||
}; \
|
||||
};
|
||||
|
||||
class LandVehicle;
|
||||
class Car: LandVehicle {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
class Tank: LandVehicle {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
class Air;
|
||||
class Helicopter: Air {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
class Plane: Air {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
class Ship;
|
||||
class Ship_F: Ship {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
class StaticWeapon: LandVehicle {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
class StaticMortar;
|
||||
class Mortar_01_base_F: StaticMortar {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class AGM_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_CableTie,12)
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
class AGM_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class AGM_CableTie: AGM_ItemCore {
|
||||
displayName = "$STR_AGM_Captives_CableTie";
|
||||
descriptionShort = "$STR_AGM_Captives_CableTieDescription";
|
||||
model = "\AGM_Captives\agm_cabletie.p3d";
|
||||
picture = "\AGM_Captives\UI\agm_cabletie_x_ca.paa";
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/*class CfgMovesBasic;
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class States {
|
||||
class CutSceneAnimationBase;
|
||||
class AmovPercMstpSnonWnonDnon_EaseIn: CutSceneAnimationBase {
|
||||
head = "headDefault";
|
||||
static = 1;
|
||||
disableWeapons = 0;
|
||||
forceAim = 0;
|
||||
InterpolateTo[] = {"AmovPercMstpSnonWnonDnon_EaseOut",0.02,"Unconscious",0.1};
|
||||
};
|
||||
class AmovPercMstpSnonWnonDnon_Ease: AmovPercMstpSnonWnonDnon_EaseIn {
|
||||
looped = 1;
|
||||
InterpolateTo[] = {"Unconscious",0.1};
|
||||
};
|
||||
class AmovPercMstpSnonWnonDnon_EaseOut: AmovPercMstpSnonWnonDnon_EaseIn {
|
||||
InterpolateTo[] = {"AmovPercMstpSnonWnonDnon_EaseIn",0.02,"Unconscious",0.1};
|
||||
};
|
||||
|
||||
class AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon: CutSceneAnimationBase {
|
||||
InterpolateTo[] = {"Unconscious",0.01,"AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||
};
|
||||
|
||||
class AmovPercMstpSsurWnonDnon: AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||
looped = 1;
|
||||
InterpolateTo[] = {"Unconscious",0.01};
|
||||
};
|
||||
|
||||
class AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||
InterpolateTo[] = {"Unconscious",0.01,"AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
|
||||
};
|
||||
};
|
||||
};*/
|
||||
|
||||
class CfgMovesBasic {
|
||||
class Actions {
|
||||
class CivilStandActions;
|
||||
class AGM_CivilStandCaptiveActions: CivilStandActions {
|
||||
turnL = "";
|
||||
turnR = "";
|
||||
stop = "AGM_AmovPercMstpScapWnonDnon";
|
||||
StopRelaxed = "AGM_AmovPercMstpScapWnonDnon";
|
||||
default = "AGM_AmovPercMstpScapWnonDnon";
|
||||
getOver = "";
|
||||
throwPrepare = "";
|
||||
throwGrenade[] = {"","Gesture"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class StandBase;
|
||||
class States {
|
||||
class AmovPercMstpSnonWnonDnon: StandBase {
|
||||
ConnectTo[] += {"AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
|
||||
};
|
||||
|
||||
class CutSceneAnimationBase;
|
||||
class AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon: CutSceneAnimationBase {
|
||||
actions = "AGM_CivilStandCaptiveActions";
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_EaseIn";
|
||||
speed = 1;
|
||||
looped = 0;
|
||||
interpolationRestart = 2;
|
||||
ConnectTo[] = {"AGM_AmovPercMstpScapWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01,"AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||
};
|
||||
|
||||
class AGM_AmovPercMstpScapWnonDnon: AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease";
|
||||
speed = 0;
|
||||
ConnectTo[] = {"AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01};
|
||||
looped = 1;
|
||||
};
|
||||
|
||||
class AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon: AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
|
||||
actions = "CivilStandActions";
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\amovpercmstpsnonwnondnon_easeout";
|
||||
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01,"AGM_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
player playMove "AGM_AmovPercMstpScapWnonDnon";
|
||||
player switchMove "AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||
*/
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
* By: bux578
|
||||
*
|
||||
* Checks the conditions for being able to frisk a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caller (player) (Object)
|
||||
* 1: target (Object)
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean
|
||||
*/
|
||||
|
||||
private ["_unit", "_target"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
_target getVariable ["AGM_isCaptive", false]
|
||||
|| {_target getVariable ["AGM_isSearchable", false]}
|
||||
|| {_target getVariable ["AGM_isUnconscious", false]}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Check if the unit can load the target object into a vehicle.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Unit that wants to load a captive (Object)
|
||||
* 1: A captive. ObjNull for the first escorted captive (Object)
|
||||
* 2: Vehicle to load the captive into. ObjNull for the nearest vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Boolean (Bool)
|
||||
*/
|
||||
|
||||
private ["_unit", "_target", "_vehicle", "_objects"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_vehicle = _this select 2;
|
||||
|
||||
if (isNull _target) then {
|
||||
_objects = attachedObjects _unit;
|
||||
_objects = [_objects, {_this getVariable ["AGM_isCaptive", false]}] call AGM_Core_fnc_filter;
|
||||
_target = _objects select 0;
|
||||
};
|
||||
|
||||
if (isNull _vehicle) then {
|
||||
_objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship_F"], 10];
|
||||
_vehicle = _objects select 0;
|
||||
};
|
||||
|
||||
_unit getVariable ["AGM_isEscorting", false]
|
||||
&& {!isNil "_target"}
|
||||
&& {!isNil "_vehicle"}
|
||||
&& {_vehicle emptyPositions "cargo" > 0}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Check if the unit can unload a captive from the vehicle.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Unit that wants to unload a captive (Object)
|
||||
* 1: Vehicle to unload a captive from. (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Boolean (Bool)
|
||||
*/
|
||||
|
||||
private ["_unit", "_vehicle", "_cargo"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
|
||||
_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
|
||||
|
||||
_cargo = [_cargo, {_this getVariable ["AGM_isCaptive", false]}] call AGM_Core_fnc_filter;
|
||||
|
||||
count _cargo > 0
|
@ -1,43 +0,0 @@
|
||||
//author : Nic547
|
||||
//Attaches a Captive to the player
|
||||
|
||||
private ["_unit", "_state"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_state = _this select 1;
|
||||
|
||||
if !("AGM_Handcuffed" in ([_unit] call AGM_Core_fnc_getCaptivityStatus)) exitWith {
|
||||
[localize "STR_AGM_Captives_NoCaptive"] call AGM_Core_fnc_displayTextStructured;
|
||||
};
|
||||
|
||||
if (_state) then {
|
||||
if (player getVariable ["AGM_isEscorting", false]) exitWith {};
|
||||
|
||||
[player, _unit] call AGM_Core_fnc_claim;
|
||||
player setVariable ["AGM_isEscorting", true, true];
|
||||
|
||||
_unit attachTo [player, [0, 1, 0]];
|
||||
|
||||
player setVariable ["AGM_escortedUnit", _unit, true];
|
||||
_actionID = player addAction [format ["<t color='#FF0000'>%1</t>", localize "STR_AGM_Captives_StopEscorting"], "[player getVariable ['AGM_escortedUnit', objNull], false] call AGM_Captives_fnc_escortCaptive;", nil, 20, false, true, "", "!isNull (player getVariable ['AGM_escortedUnit', objNull])"];
|
||||
|
||||
[_unit, _actionID] spawn {
|
||||
_unit = _this select 0;
|
||||
_actionID = _this select 1;
|
||||
|
||||
while {player getVariable ["AGM_isEscorting", false]} do {
|
||||
sleep 0.2;
|
||||
|
||||
if (!alive _unit || {!alive player} || {!canStand _unit} || {!canStand player} || {_unit getVariable ["AGM_isUnconscious", false]} || {player getVariable ["AGM_isUnconscious", false]} || {!isNull (attachedTo player)}) then {
|
||||
player setVariable ["AGM_isEscorting", false, true];
|
||||
};
|
||||
};
|
||||
[objNull, _unit] call AGM_Core_fnc_claim;
|
||||
|
||||
detach _unit;
|
||||
player removeAction _actionID;
|
||||
};
|
||||
} else {
|
||||
player setVariable ["AGM_isEscorting", false, true];
|
||||
player setVariable ["AGM_escortedUnit", objNull, true];
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private ["_vehicle", "_unit", "_cargoIndex"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_unit = _this select 2;
|
||||
|
||||
_cargoIndex = _unit getVariable ["AGM_Captives_CargoIndex", -1];
|
||||
|
||||
if (_cargoIndex != -1) exitWith {
|
||||
_unit moveInCargo [_vehicle, _cargoIndex];
|
||||
};
|
||||
|
||||
[_unit, 'AGM_AmovPercMstpScapWnonDnon', 2] call AGM_Core_fnc_doAnimation;
|
@ -1,12 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private ["_unit", "_oldUnit"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_oldUnit = _this select 1;
|
||||
|
||||
if (_unit getVariable ["AGM_isCaptive", false]) then {
|
||||
showHUD false;
|
||||
} else {
|
||||
showHUD true;
|
||||
};
|
@ -1,10 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private "_unit";
|
||||
|
||||
_unit = _this select 0;
|
||||
|
||||
if (_unit getVariable ["AGM_isCaptive", false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call AGM_Core_fnc_fixLoweredRifleAnimation;
|
||||
[_unit, "AGM_AmovPercMstpScapWnonDnon", 0] call AGM_Core_fnc_doAnimation;
|
||||
};
|
@ -1,11 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private "_unit";
|
||||
|
||||
_unit = _this select 0;
|
||||
|
||||
// reset status on mission start
|
||||
if (_unit getVariable ["AGM_isCaptive", false]) then {
|
||||
_unit setVariable ["AGM_isCaptive", false];
|
||||
[_unit, true] call AGM_Captives_fnc_setCaptive;
|
||||
};
|
@ -1,12 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
[_this select 0, "knockedOut", {
|
||||
if (local (_this select 0)) then {_this call AGM_Captives_fnc_handleKnockedOut};
|
||||
}] call AGM_Core_fnc_addCustomEventhandler;
|
||||
|
||||
[_this select 0, "wokeUp", {
|
||||
if (local (_this select 0)) then {_this call AGM_Captives_fnc_handleWokeUp};
|
||||
}] call AGM_Core_fnc_addCustomEventhandler;
|
||||
|
||||
// prevent players from throwing grenades
|
||||
[_this select 0, "Throw", {(_this select 1) getVariable ["AGM_isCaptive", false]}, {}] call AGM_Core_fnc_addActionEventhandler;
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Unit loads the target object into a vehicle.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Unit that wants to load a captive (Object)
|
||||
* 1: A captive. ObjNull for the first escorted captive (Object)
|
||||
* 2: Vehicle to load the captive into. ObjNull for the nearest vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
private ["_unit", "_target", "_vehicle", "_objects"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_vehicle = _this select 2;
|
||||
|
||||
if (isNull _target) then {
|
||||
_objects = attachedObjects _unit;
|
||||
_objects = [_objects, {_this getVariable ["AGM_isCaptive", false]}] call AGM_Core_fnc_filter;
|
||||
_target = _objects select 0;
|
||||
};
|
||||
|
||||
if (isNull _vehicle) then {
|
||||
_objects = nearestObjects [_unit, ["Car_F", "Tank_F", "Helicopter_F", "Boat_F", "Plane_F"], 10];
|
||||
_vehicle = _objects select 0;
|
||||
};
|
||||
|
||||
if (!isNil "_target" && {!isNil "_vehicle"}) then {
|
||||
_unit setVariable ["AGM_isEscorting", false];
|
||||
[[_target, _vehicle], "{(_this select 0) moveInCargo (_this select 1); (_this select 0) assignAsCargo (_this select 1); (_this select 0) setVariable ['AGM_Captives_CargoIndex', (_this select 1) getCargoIndex (_this select 0), true];}", _target] call AGM_Core_fnc_execRemoteFnc;
|
||||
};
|
@ -1,70 +0,0 @@
|
||||
/*
|
||||
Name: AGM_Captives_fnc_openFriskMenu
|
||||
|
||||
Author: bux578
|
||||
|
||||
Description:
|
||||
Open the select menu with the "personal" items of a frisked unit
|
||||
It only shows "handgunWeapon", "uniformItems", "vestItems", "backpackItems" and "assignedItems" because every other item is visible on the character
|
||||
|
||||
Parameters:
|
||||
0: Object - player unit
|
||||
1: Object - unit
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
*/
|
||||
|
||||
private ["_player", "_unit", "_weapon", "_listedItemClasses", "_actions", "_allGear"];
|
||||
|
||||
_player = _this select 0;
|
||||
_unit = _this select 1;
|
||||
|
||||
_weapon = currentWeapon _player;
|
||||
if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
|
||||
[_player, "AmovPercMstpSlowWrflDnon", 0] call AGM_Core_fnc_doAnimation;
|
||||
};
|
||||
|
||||
_listedItemClasses = [];
|
||||
|
||||
_actions = [localize "STR_AGM_Captives_FriskMenuHeader", localize "STR_AGM_Captives_CancelSelection"] call AGM_Interaction_fnc_prepareSelectMenu;
|
||||
|
||||
_allGear = [];
|
||||
|
||||
if ((handgunWeapon _unit) != "") then {
|
||||
_allGear pushBack (handgunWeapon _unit);
|
||||
};
|
||||
if (count (uniformItems _unit) > 0) then {
|
||||
_allGear = _allGear + (uniformItems _unit);
|
||||
};
|
||||
if (count (vestItems _unit) > 0) then {
|
||||
_allGear = _allGear + (vestItems _unit);
|
||||
};
|
||||
if (count (backpackItems _unit) > 0) then {
|
||||
_allGear = _allGear + (backpackItems _unit);
|
||||
};
|
||||
if (count (assignedItems _unit) > 0) then {
|
||||
_allGear = _allGear + (assignedItems _unit);
|
||||
};
|
||||
|
||||
// Handgun
|
||||
// Uniform Items
|
||||
// Vest Items
|
||||
// Backpack Items
|
||||
// Assigned Items
|
||||
{
|
||||
if (!(_x in _listedItemClasses)) then {
|
||||
private "_item";
|
||||
_item = configFile >> "CfgMagazines" >> _x;
|
||||
if (isNil "_item" || str _item == "") then { //str _item ?
|
||||
_item = configFile >> "CfgWeapons" >> _x;
|
||||
};
|
||||
_actions = [_actions, getText(_item >> "displayName"), getText(_item >> "picture"), _x] call AGM_Interaction_fnc_addSelectableItem;
|
||||
_listedItemClasses pushBack _x;
|
||||
};
|
||||
} forEach (_allGear);
|
||||
|
||||
[_actions, {call AGM_Interaction_fnc_hideMenu;}, {call AGM_Interaction_fnc_hideMenu;}] call AGM_Interaction_fnc_openSelectMenu;
|
||||
|
||||
// don't need an "Ok" Button
|
||||
ctrlShow [8860, false];
|
@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Author: Nic547, commy2
|
||||
*
|
||||
* Makes a civilian unable to move.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Unit (Object)
|
||||
* 1: True to take captive, false to release captive (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
private ["_unit", "_state"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_state = _this select 1;
|
||||
|
||||
if (!local _unit) exitWith {[[_unit, _state, true], _fnc_scriptName, _unit] call AGM_Core_fnc_execRemoteFnc};
|
||||
|
||||
if (_state) then {
|
||||
if (_unit getVariable ["AGM_isCaptive", false]) exitWith {};
|
||||
|
||||
_unit setVariable ["AGM_isCaptive", true, true];
|
||||
|
||||
// fix anim on mission start (should work on dedicated servers)
|
||||
_unit spawn {
|
||||
[_this, "AGM_Handcuffed", true] call AGM_Core_fnc_setCaptivityStatus;
|
||||
|
||||
if (_this getVariable ["AGM_isCaptive", false] && {vehicle _this == _this}) then {
|
||||
[_this] call AGM_Core_fnc_fixLoweredRifleAnimation;
|
||||
[_this, "AGM_AmovPercMstpScapWnonDnon", 0] spawn AGM_Core_fnc_doAnimation;
|
||||
};
|
||||
};
|
||||
|
||||
_unit setVariable ["AGM_Captives_CargoIndex", vehicle _unit getCargoIndex _unit, true];
|
||||
|
||||
if (_unit == AGM_player) then {
|
||||
showHUD false;
|
||||
};
|
||||
} else {
|
||||
if !(_unit getVariable ["AGM_isCaptive", false]) exitWith {};
|
||||
|
||||
_unit setVariable ["AGM_isCaptive", false, true];
|
||||
[_unit, "AGM_Handcuffed", false] call AGM_Core_fnc_setCaptivityStatus;
|
||||
if (vehicle _unit == _unit) then {
|
||||
[_unit, "AGM_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call AGM_Core_fnc_doAnimation;
|
||||
};
|
||||
|
||||
if (_unit getVariable ["AGM_Captives_CargoIndex", -1] != -1) then {
|
||||
_unit setVariable ["AGM_Captives_CargoIndex", -1, true];
|
||||
};
|
||||
|
||||
if (_unit == AGM_player) then {
|
||||
showHUD true;
|
||||
};
|
||||
};
|
@ -1,50 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private ["_unit", "_state"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_state = _this select 1;
|
||||
|
||||
if (!local _unit) exitWith {[_this, _fnc_scriptName, _unit] call AGM_Core_fnc_execRemoteFnc};
|
||||
|
||||
if (_state) then {
|
||||
if (_unit getVariable ["AGM_isSurrender", false]) exitWith {};
|
||||
|
||||
_unit setVariable ["AGM_isSurrender", true, true];
|
||||
[_unit, "AGM_Surrendered", true] call AGM_Core_fnc_setCaptivityStatus;
|
||||
|
||||
_unit spawn {
|
||||
// fix for lowered rifle animation glitch
|
||||
if (currentWeapon _this != "" && {currentWeapon _this == primaryWeapon _this} && {weaponLowered _this} && {stance _this == "STAND"}) then {
|
||||
_this playMove "amovpercmstpsraswrfldnon";
|
||||
};
|
||||
|
||||
while {_this getVariable ["AGM_isSurrender", false]} do {
|
||||
sleep 0.001; //sleep in UI
|
||||
|
||||
if (isPlayer _this) then {showHUD false};
|
||||
|
||||
if (!alive _this || {_this getVariable ["AGM_isUnconscious", false]}) then {
|
||||
_this setVariable ["AGM_isSurrender", false, true];
|
||||
} else {
|
||||
_this playMove "amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon";
|
||||
};
|
||||
};
|
||||
if !(_this getVariable ["AGM_isUnconscious", false]) then {
|
||||
_this playMoveNow "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||
} else {
|
||||
_this playMoveNow "unconscious";
|
||||
};
|
||||
|
||||
[_this, "AGM_Surrendered", false] call AGM_Core_fnc_setCaptivityStatus;
|
||||
|
||||
if (isPlayer _this) then {showHUD true};
|
||||
};
|
||||
} else {
|
||||
_unit setVariable ["AGM_isSurrender", false, true];
|
||||
};
|
||||
|
||||
/*
|
||||
player playMove "AmovPercMstpSsurWnonDnon"
|
||||
player switchMove "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon"
|
||||
*/
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Unit unloads a captive from a vehicle.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Unit that wants to unload a captive (Object)
|
||||
* 1: Vehicle to unload a captive from. (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
private ["_unit", "_vehicle", "_cargo", "_target"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
|
||||
_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
|
||||
|
||||
_cargo = [_cargo, {_this getVariable ["AGM_isCaptive", false]}] call AGM_Core_fnc_filter;
|
||||
|
||||
if (count _cargo > 0) then {
|
||||
_target = _cargo select 0;
|
||||
|
||||
_target setVariable ["AGM_Captives_CargoIndex", -1, true];
|
||||
|
||||
moveOut _target;
|
||||
[_target, "AGM_AmovPercMstpScapWnonDnon", 2] call AGM_Core_fnc_doAnimation;
|
||||
[_target, "{unassignVehicle _this}", _target] call AGM_Core_fnc_execRemoteFnc;
|
||||
};
|
@ -1,302 +1,43 @@
|
||||
|
||||
class CfgAmmo {
|
||||
class BulletBase;
|
||||
class B_20mm: BulletBase {
|
||||
deflecting = 3;
|
||||
hit = 100;
|
||||
indirectHit = 10;
|
||||
indirectHitRange = 2;
|
||||
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
|
||||
};
|
||||
|
||||
// adjust minigun caliber and deflection to other ammo
|
||||
class SubmunitionBullet;
|
||||
class B_65x39_Minigun_Caseless: SubmunitionBullet {
|
||||
hit = 10;
|
||||
indirectHit = 0;
|
||||
indirectHitRange = 0;
|
||||
caliber = 1;
|
||||
deflecting = 5;
|
||||
typicalSpeed = 850;
|
||||
deflecting = 15;
|
||||
};
|
||||
|
||||
class B_762x51_Minigun_Tracer_Red: SubmunitionBullet {
|
||||
hit = 12;
|
||||
indirectHit = 0;
|
||||
indirectHitRange = 0;
|
||||
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
|
||||
caliber = 1.6;
|
||||
deflecting = 5;
|
||||
typicalSpeed = 850;
|
||||
};
|
||||
|
||||
class M_Titan_AA;
|
||||
class M_Zephyr: M_Titan_AA {
|
||||
proxyShape = "\A3\Weapons_F\Ammo\Missile_AA_02_F.p3d";
|
||||
model = "\A3\Weapons_F\Ammo\Missile_AA_02_fly_F.p3d";
|
||||
airFriction = 0.078;
|
||||
sideAirFriction = 0.18;
|
||||
maneuvrability = 24;
|
||||
class CamShakeFire {};
|
||||
class CamShakePlayerFire {};
|
||||
};
|
||||
|
||||
class M_Zephyr_Mi06: M_Zephyr {
|
||||
maverickWeaponIndexOffset = 6;
|
||||
};
|
||||
|
||||
class MissileBase;
|
||||
class M_Air_AA: MissileBase {
|
||||
model = "\A3\Weapons_F\Ammo\Missile_AT_02_fly_F";
|
||||
proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_02_F";
|
||||
hit = 280;
|
||||
indirectHit = 85;
|
||||
indirectHitRange = 10;
|
||||
maneuvrability = 27;
|
||||
simulationStep = 0.002;
|
||||
airLock = 1;
|
||||
irLock = 1;
|
||||
cost = 1500;
|
||||
//maxSpeed = 2400;
|
||||
timeToLive = 40;
|
||||
airFriction = 0.05;
|
||||
sideAirFriction = 0.1;
|
||||
trackOversteer = 1;
|
||||
trackLead = 1;
|
||||
initTime = 0;
|
||||
thrustTime = 12;
|
||||
thrust = 340;
|
||||
fuseDistance = 500;
|
||||
weaponLockSystem = "2 + 16";
|
||||
maxControlRange = 8000;
|
||||
class CamShakeExplode {};
|
||||
class CamShakeHit {};
|
||||
class CamShakeFire {};
|
||||
class CamShakePlayerFire {};
|
||||
};
|
||||
|
||||
class Missile_AA_04_F: MissileBase {
|
||||
hit = 800;
|
||||
indirectHit = 60;
|
||||
indirectHitRange = 12;
|
||||
airLock = 2;
|
||||
irLock = 1;
|
||||
laserLock = 0;
|
||||
nvLock = 0;
|
||||
weaponLockSystem = "2 + 16";
|
||||
cmimmunity = 0.8;
|
||||
initTime = 0;
|
||||
thrust = 380;
|
||||
thrustTime = 9.5;
|
||||
airFriction = 0.04;
|
||||
sideAirFriction = 0.08;
|
||||
//maxSpeed = 2600;
|
||||
maneuvrability = 14;
|
||||
simulationStep = 0.002;
|
||||
fuseDistance = 500;
|
||||
timeToLive = 19;
|
||||
trackLead = 1;
|
||||
trackOversteer = 1;
|
||||
deflecting = 15;
|
||||
};
|
||||
|
||||
// also adjust tracer, "muh lightshow"; also adjust splash damage radius
|
||||
class BulletBase;
|
||||
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
|
||||
model = "\A3\Weapons_f\Data\bullettracer\tracer_red.p3d";
|
||||
cost = 20;
|
||||
hit = 80;
|
||||
indirectHit = 12;
|
||||
indirectHitRange = 3;
|
||||
indirectHitRange = 3; //2;
|
||||
caliber = 1.4;
|
||||
explosive = 0.6;
|
||||
airlock = 1;
|
||||
deflecting = 3;
|
||||
airFriction = -0.00042;
|
||||
typicalSpeed = 960;
|
||||
visibleFire = 32;
|
||||
audibleFire = 32;
|
||||
visibleFireTime = 3;
|
||||
fuseDistance = 3;
|
||||
tracerScale = 2.5;
|
||||
tracerStartTime = 0.02;
|
||||
tracerEndTime = 4.7;
|
||||
multiSoundHit[] = {"soundHit1",0.2,"soundHit2",0.2,"soundHit3",0.2,"soundHit4",0.1,"soundHit5",0.15,"soundHit6",0.15};
|
||||
soundFly[] = {"A3\Sounds_F\weapons\Explosion\cannon_fly",1,1,50};
|
||||
explosionSoundEffect = "DefaultExplosion";
|
||||
explosionEffects = "ExploAmmoExplosion";
|
||||
craterEffects = "ExploAmmoCrater";
|
||||
soundHit1[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_1",3.16228,1,1600};
|
||||
soundHit2[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_2",3.16228,1,1600};
|
||||
soundHit3[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_3",3.16228,1,1600};
|
||||
soundHit4[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_4",3.16228,1,1600};
|
||||
soundHit5[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_5",3.16228,1,1600};
|
||||
soundHit6[] = {"A3\Sounds_F\weapons\Explosion\gr_explosion_6",3.16228,1,1600};
|
||||
class CamShakeExplode {};
|
||||
class CamShakeHit {};
|
||||
class CamShakeFire {};
|
||||
class CamShakePlayerFire {};
|
||||
};
|
||||
|
||||
// helper projectiles to simulate a rof > fps
|
||||
class ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy: Gatling_30mm_HE_Plane_CAS_01_F {
|
||||
simulation = "shotSubmunitions";
|
||||
triggerTime = 0;
|
||||
submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub";
|
||||
submunitionConeType[] = {"custom", {{0,0}, {0,0}, {0,0}} };
|
||||
};
|
||||
class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {
|
||||
};
|
||||
|
||||
class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {};
|
||||
|
||||
// adjust damage and splash damage, closer to bluefor gatling with same caliber
|
||||
class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F {
|
||||
model = "\A3\Weapons_f\Data\bullettracer\tracer_green.p3d";
|
||||
hit = 70;
|
||||
indirectHit = 11;
|
||||
hit = 70; //40;
|
||||
indirectHit = 11; //14;
|
||||
indirectHitRange = 3;
|
||||
caliber = 2;
|
||||
explosive = 0.6;
|
||||
};
|
||||
|
||||
class Missile_AGM_02_F: MissileBase {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_fly_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_F.p3d";
|
||||
maverickWeaponIndexOffset = 2;
|
||||
cost = 1500;
|
||||
hit = 2100;
|
||||
indirectHit = 85;
|
||||
indirectHitRange = 8;
|
||||
manualControl = 0;
|
||||
maxControlRange = 8000;
|
||||
airLock = 0;
|
||||
irLock = 1;
|
||||
laserLock = 0;
|
||||
nvLock = 0;
|
||||
weaponLockSystem = "2 + 16";
|
||||
cmimmunity = 0.8;
|
||||
initTime = 0;
|
||||
thrust = 240;
|
||||
thrustTime = 5;
|
||||
airFriction = 0.05;
|
||||
sideAirFriction = 0.1;
|
||||
maxSpeed = 828;
|
||||
maneuvrability = 27;
|
||||
simulationStep = 0.002;
|
||||
fuseDistance = 500;
|
||||
timeToLive = 40;
|
||||
trackLead = 1;
|
||||
trackOversteer = 1;
|
||||
craterEffects = "AAMissileCrater";
|
||||
effectsMissile = "missile3";
|
||||
explosionEffects = "AAMissileExplosion";
|
||||
muzzleEffect = "BIS_fnc_effectFiredHeliRocket";
|
||||
whistleDist = 20;
|
||||
class CamShakeExplode {};
|
||||
class CamShakeHit {};
|
||||
class CamShakeFire {};
|
||||
class CamShakePlayerFire {};
|
||||
};
|
||||
|
||||
class LaserBombCore;
|
||||
class Bomb_04_F: LaserBombCore {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Bomb_04_fly_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Bomb_04_F.p3d";
|
||||
maverickWeaponIndexOffset = 8;
|
||||
hit = 6000;
|
||||
indirectHit = 1400;
|
||||
indirectHitRange = 15;
|
||||
nvLock = 1;
|
||||
weaponLockSystem = "2 + 16 + 4";
|
||||
maneuvrability = 20;
|
||||
fuseDistance = 35;
|
||||
trackLead = 0.95;
|
||||
trackOversteer = 1;
|
||||
craterEffects = "BombCrater";
|
||||
explosionEffects = "BombExplosion";
|
||||
explosionSoundEffect = "DefaultExplosion";
|
||||
explosionTime = 2;
|
||||
multiSoundHit[] = {"soundHit1",0.2,"soundHit2",0.2,"soundHit3",0.2,"soundHit4",0.2,"soundHit5",0.2};
|
||||
soundHit1[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_1",2.51189,1,2400};
|
||||
soundHit2[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_2",2.51189,1,2400};
|
||||
soundHit3[] = {"\A3\Sounds_F\weapons\Explosion\expl_big_3",2.51189,1,2400};
|
||||
soundHit4[] = {"\A3\Sounds_F\weapons\Explosion\expl_shell_1",2.51189,1,2400};
|
||||
soundHit5[] = {"\A3\Sounds_F\weapons\Explosion\expl_shell_2",2.51189,1,2400};
|
||||
whistleDist = 24;
|
||||
};
|
||||
|
||||
class Rocket_04_HE_F: MissileBase {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_fly_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_F.p3d";
|
||||
maverickWeaponIndexOffset = 12;
|
||||
cost = 500;
|
||||
hit = 210;
|
||||
indirectHit = 55;
|
||||
indirectHitRange = 15;
|
||||
manualControl = 0;
|
||||
maxControlRange = 8000;
|
||||
airLock = 0;
|
||||
irLock = 1;
|
||||
laserLock = 0;
|
||||
nvLock = 0;
|
||||
weaponLockSystem = 0;
|
||||
cmimmunity = 1;
|
||||
initTime = 0.002;
|
||||
thrust = 1600;
|
||||
thrustTime = 0.7;
|
||||
airFriction = 0.0046;
|
||||
sideAirFriction = 0.005;
|
||||
maxSpeed = 610;
|
||||
maneuvrability = 0;
|
||||
fuseDistance = 50;
|
||||
timeToLive = 60;
|
||||
effectsMissileInit = "MissileDAR1";
|
||||
whistleDist = 30;
|
||||
class CamShakeExplode {};
|
||||
class CamShakeHit {};
|
||||
class CamShakeFire {};
|
||||
class CamShakePlayerFire {};
|
||||
};
|
||||
|
||||
class Rocket_04_AP_F: Rocket_04_HE_F {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_fly_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_F.p3d";
|
||||
maverickWeaponIndexOffset = 19;
|
||||
hit = 400;
|
||||
indirectHit = 20;
|
||||
indirectHitRange = 10;
|
||||
};
|
||||
|
||||
class Missile_AA_03_F: Missile_AA_04_F {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_fly_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_F.p3d";
|
||||
maverickWeaponIndexOffset = 0;
|
||||
hit = 900;
|
||||
indirectHit = 50;
|
||||
indirectHitRange = 15;
|
||||
};
|
||||
|
||||
class Missile_AGM_01_F: Missile_AGM_02_F {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_fly_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_F.p3d";
|
||||
maverickWeaponIndexOffset = 2;
|
||||
hit = 2200;
|
||||
indirectHit = 90;
|
||||
indirectHitRange = 10;
|
||||
};
|
||||
|
||||
class Bomb_03_F: Bomb_04_F {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d";
|
||||
maverickWeaponIndexOffset = 6;
|
||||
hit = 6400;
|
||||
indirectHit = 1400;
|
||||
indirectHitRange = 16;
|
||||
};
|
||||
|
||||
class Rocket_03_HE_F: Rocket_04_HE_F {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_fly_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d";
|
||||
maverickWeaponIndexOffset = 8;
|
||||
};
|
||||
|
||||
class Rocket_03_AP_F: Rocket_04_AP_F {
|
||||
model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_fly_F.p3d";
|
||||
proxyShape = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_F.p3d";
|
||||
maverickWeaponIndexOffset = 28;
|
||||
};
|
||||
|
||||
class RocketBase;
|
||||
};
|
||||
|
@ -1,202 +1,15 @@
|
||||
|
||||
class CfgMagazines {
|
||||
// shoot helper object to tripple rof
|
||||
class VehicleMagazine;
|
||||
class 24Rnd_PG_missiles;
|
||||
|
||||
class 12Rnd_PG_missiles: 24Rnd_PG_missiles {
|
||||
count = 12;
|
||||
displayName = "$STR_A3_CfgMagazines_12Rnd_PG_missiles0";
|
||||
displayNameShort = "$STR_A3_CfgMagazines_12Rnd_PG_missiles_dns";
|
||||
descriptionShort = "$STR_A3_CfgMagazines_12Rnd_PG_missiles1";
|
||||
};
|
||||
class 12Rnd_missiles: VehicleMagazine {
|
||||
scope = 2;
|
||||
count = 12;
|
||||
ammo = "M_AT";
|
||||
displayName = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles0";
|
||||
displayNameShort = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles_dns";
|
||||
descriptionShort = "$STR_A3_CfgMagazines_24Rnd_PuG_missiles0";
|
||||
initSpeed = 44;
|
||||
maxLeadSpeed = 800;
|
||||
nameSound = "rockets";
|
||||
sound[] = {"A3\sounds_f\weapons\rockets\explosion_missile_01",1,1,1200};
|
||||
reloadSound[] = {"",0.000316228,1};
|
||||
};
|
||||
|
||||
//minigun magazines, muzzle velocities and tracercounts
|
||||
class 200Rnd_65x39_Belt: VehicleMagazine {};
|
||||
class 2000Rnd_65x39_Belt: 200Rnd_65x39_Belt {};
|
||||
class 2000Rnd_65x39_Belt_Tracer_Red: 2000Rnd_65x39_Belt {
|
||||
};
|
||||
class 2000Rnd_65x39_Belt_Green: 2000Rnd_65x39_Belt {};
|
||||
class 2000Rnd_65x39_Belt_Tracer_Green: 2000Rnd_65x39_Belt_Green {
|
||||
tracersEvery = 1;
|
||||
};
|
||||
class 2000Rnd_65x39_Belt_Yellow: 2000Rnd_65x39_Belt {
|
||||
tracersEvery = 1;
|
||||
};
|
||||
class 2000Rnd_65x39_Belt_Tracer_Yellow: 2000Rnd_65x39_Belt_Yellow {
|
||||
tracersEvery = 1;
|
||||
};
|
||||
|
||||
class 5000Rnd_762x51_Belt: 2000Rnd_65x39_Belt {
|
||||
tracersEvery = 1;
|
||||
count = 5000;
|
||||
};
|
||||
class 5000Rnd_762x51_Yellow_Belt: 5000Rnd_762x51_Belt {};
|
||||
class 4000Rnd_762x51_M134 : 5000Rnd_762x51_Belt {
|
||||
count = 4000;
|
||||
tracersEvery = 1;
|
||||
};
|
||||
class 2000Rnd_762x51_M134 : 4000Rnd_762x51_M134 {
|
||||
count = 2000;
|
||||
tracersEvery = 1;
|
||||
};
|
||||
|
||||
class 2Rnd_AAA_missiles: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayName = "$STR_A3_CfgMagazines_2Rnd_AAA_missiles0";
|
||||
displayNameShort = "$STR_A3_CfgMagazines_2Rnd_AAA_missiles_dns";
|
||||
ammo = "M_Air_AA";
|
||||
count = 2;
|
||||
maxLeadSpeed = 950;
|
||||
nameSound = "missiles";
|
||||
};
|
||||
class 2Rnd_AAA_missiles_MI02: 2Rnd_AAA_missiles {
|
||||
ammo = "M_Air_AA_MI02";
|
||||
};
|
||||
class 4Rnd_AAA_missiles: 2Rnd_AAA_missiles {
|
||||
displayName = "$STR_A3_CfgMagazines_4Rnd_AAA_missiles0";
|
||||
displayNameShort = "$STR_A3_CfgMagazines_4Rnd_AAA_missiles_dns";
|
||||
count = 4;
|
||||
};
|
||||
class 4Rnd_AAA_missiles_MI02: 4Rnd_AAA_missiles {
|
||||
ammo = "M_Air_AA_MI02";
|
||||
};
|
||||
|
||||
class 4Rnd_GAA_missiles: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayName = "$STR_A3_CfgMagazines_4Rnd_GAA_missiles0";
|
||||
displayNameShort = "$STR_A3_CfgMagazines_4Rnd_GAA_missiles_dns";
|
||||
count = 4;
|
||||
ammo = "M_Zephyr";
|
||||
maxLeadSpeed = 950;
|
||||
nameSound = "missiles";
|
||||
};
|
||||
|
||||
class 300Rnd_20mm_shells: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayName = "$STR_A3_CfgMagazines_300Rnd_20mm_shells0";
|
||||
displayNameShort = "$STR_A3_CfgMagazines_300Rnd_20mm_shells_dns";
|
||||
ammo = "B_20mm";
|
||||
count = 300;
|
||||
deflecting = 3;
|
||||
maxLeadSpeed = 300;
|
||||
tracersEvery = 5;
|
||||
nameSound = "cannon";
|
||||
};
|
||||
|
||||
class 1000Rnd_Gatling_30mm_Plane_CAS_01_F: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayNameShort = "";
|
||||
ammo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy";
|
||||
count = 1170;
|
||||
//count = 390;
|
||||
//initSpeed = 3852;
|
||||
maxLeadSpeed = 300;
|
||||
nameSound = "cannon";
|
||||
tracersEvery = 1;
|
||||
};
|
||||
|
||||
class 2Rnd_Missile_AA_04_F: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_4RND_AAA_MISSILES_DNS";
|
||||
ammo = "Missile_AA_04_F";
|
||||
count = 2;
|
||||
maxLeadSpeed = 220;
|
||||
nameSound = "missiles";
|
||||
};
|
||||
class 6Rnd_Missile_AGM_02_F: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
|
||||
ammo = "Missile_AGM_02_F";
|
||||
count = 6;
|
||||
maxLeadSpeed = 450;
|
||||
nameSound = "missiles";
|
||||
};
|
||||
class 2Rnd_Missile_AGM_02_F: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
|
||||
ammo = "Missile_AGM_02_F";
|
||||
count = 2;
|
||||
maxLeadSpeed = 450;
|
||||
nameSound = "missiles";
|
||||
};
|
||||
|
||||
class 7Rnd_Rocket_04_HE_F: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_40RND_20MM_G_BELT_DNS";
|
||||
ammo = "Rocket_04_HE_F";
|
||||
count = 7;
|
||||
maxLeadSpeed = 200;
|
||||
nameSound = "rockets";
|
||||
};
|
||||
class 7Rnd_Rocket_04_AP_F: 7Rnd_Rocket_04_HE_F {
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_TITAN_AP_DNS";
|
||||
ammo = "Rocket_04_AP_F";
|
||||
};
|
||||
|
||||
class 4Rnd_Bomb_04_F: VehicleMagazine {
|
||||
scope = 2;
|
||||
displayNameShort = "$STR_A3_CFGVEHICLES_BOMB0";
|
||||
ammo = "Bomb_04_F";
|
||||
count = 4;
|
||||
maxLeadSpeed = 1000;
|
||||
nameSound = "cannon";
|
||||
};
|
||||
|
||||
class 500Rnd_Cannon_30mm_Plane_CAS_02_F: 1000Rnd_Gatling_30mm_Plane_CAS_01_F {
|
||||
displayNameShort = "";
|
||||
ammo = "Cannon_30mm_HE_Plane_CAS_02_F";
|
||||
count = 500;
|
||||
};
|
||||
|
||||
class 2Rnd_Missile_AA_03_F: 2Rnd_Missile_AA_04_F {
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_4RND_AAA_MISSILES_DNS";
|
||||
ammo = "Missile_AA_03_F";
|
||||
count = 2;
|
||||
};
|
||||
class 4Rnd_Missile_AGM_01_F: 6Rnd_Missile_AGM_02_F {
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_38RND_80MM_ROCKETS_DNS";
|
||||
ammo = "Missile_AGM_01_F";
|
||||
count = 4;
|
||||
};
|
||||
|
||||
class 20Rnd_Rocket_03_HE_F: 7Rnd_Rocket_04_HE_F {
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_40RND_20MM_G_BELT_DNS";
|
||||
ammo = "Rocket_03_HE_F";
|
||||
count = 20;
|
||||
};
|
||||
class 20Rnd_Rocket_03_AP_F: 7Rnd_Rocket_04_AP_F {
|
||||
displayNameShort = "$STR_A3_CFGMAGAZINES_TITAN_AP_DNS";
|
||||
ammo = "Rocket_03_AP_F";
|
||||
count = 20;
|
||||
};
|
||||
|
||||
class 2Rnd_Bomb_03_F: 4Rnd_Bomb_04_F {
|
||||
displayNameShort = "$STR_A3_CFGVEHICLES_BOMB0";
|
||||
ammo = "Bomb_03_F";
|
||||
count = 2;
|
||||
};
|
||||
|
||||
// an extended magazine for the comanche
|
||||
class 300Rnd_20mm_shells;
|
||||
class ACE_500Rnd_20mm_shells_Comanche: 300Rnd_20mm_shells {
|
||||
displayName = "20mm";
|
||||
displayNameShort = "20mm";
|
||||
ammo = "B_20mm";
|
||||
count = 500;
|
||||
deflecting = 3;
|
||||
initSpeed = 1030;
|
||||
maxLeadSpeed = 300;
|
||||
tracersEvery = 5;
|
||||
};
|
||||
};
|
||||
|
@ -8,12 +8,9 @@ class CfgVehicles {
|
||||
class NewTurret {
|
||||
class Turrets;
|
||||
};
|
||||
class CargoTurret;
|
||||
};
|
||||
|
||||
class Air: AllVehicles {
|
||||
class AnimationSources;
|
||||
};
|
||||
class Air: AllVehicles {};
|
||||
|
||||
class Helicopter: Air {
|
||||
class Turrets {
|
||||
@ -33,6 +30,7 @@ class CfgVehicles {
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret;
|
||||
};
|
||||
class AnimationSources;
|
||||
};
|
||||
|
||||
class Helicopter_Base_H: Helicopter_Base_F {
|
||||
@ -46,7 +44,7 @@ class CfgVehicles {
|
||||
lockDetectionSystem = 0;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
//class MFD {};
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
@ -55,14 +53,11 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class B_Heli_Light_01_F: Heli_Light_01_base_F {
|
||||
class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {};
|
||||
|
||||
class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F {
|
||||
/*class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {};
|
||||
|
||||
class CargoTurret_01: CargoTurret {};
|
||||
class CargoTurret_02: CargoTurret_01 {};
|
||||
class CargoTurret_03: CargoTurret_02 {};
|
||||
class CargoTurret_04: CargoTurret_01 {};
|
||||
};*/
|
||||
};
|
||||
|
||||
@ -70,7 +65,7 @@ class CfgVehicles {
|
||||
lockDetectionSystem = 0;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
//class MFD {};
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
@ -84,7 +79,8 @@ class CfgVehicles {
|
||||
driverCanEject = 1;
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"};
|
||||
magazines[] = {"2000Rnd_762x51_Belt_T_Green","12Rnd_PG_missiles","168Rnd_CMFlare_Chaff_Magazine"};
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
@ -103,36 +99,7 @@ class CfgVehicles {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
//class MFD {};
|
||||
class AnimationSources: AnimationSources {
|
||||
class HitGlass1 {
|
||||
source = "Hit";
|
||||
hitpoint = "HitGlass1";
|
||||
raw = 1;
|
||||
};
|
||||
class HitGlass2: HitGlass1 {
|
||||
hitpoint = "HitGlass2";
|
||||
};
|
||||
class HitGlass3: HitGlass1 {
|
||||
hitpoint = "HitGlass3";
|
||||
};
|
||||
class HitGlass4: HitGlass1 {
|
||||
hitpoint = "HitGlass4";
|
||||
};
|
||||
class Gatling {
|
||||
source = "revolving";
|
||||
weapon = "ACE_gatling_20mm_Comanche";
|
||||
};
|
||||
class Hide {
|
||||
source = "user";
|
||||
animPeriod = 0;
|
||||
initPhase = 0;
|
||||
};
|
||||
class Muzzle_flash {
|
||||
source = "ammorandom";
|
||||
weapon = "ACE_gatling_20mm_Comanche";
|
||||
};
|
||||
};
|
||||
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {
|
||||
canEject = 1;
|
||||
@ -141,6 +108,15 @@ class CfgVehicles {
|
||||
magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"};
|
||||
};
|
||||
};
|
||||
|
||||
class AnimationSources: AnimationSources {
|
||||
class Gatling {
|
||||
weapon = "ACE_gatling_20mm_Comanche";
|
||||
};
|
||||
class Muzzle_flash {
|
||||
weapon = "ACE_gatling_20mm_Comanche";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {};
|
||||
@ -149,6 +125,7 @@ class CfgVehicles {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {
|
||||
canEject = 1;
|
||||
@ -160,6 +137,7 @@ class CfgVehicles {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
@ -174,6 +152,7 @@ class CfgVehicles {
|
||||
canEject = 1;
|
||||
};
|
||||
};
|
||||
|
||||
/*class UserActions {
|
||||
class DoorL1_Open {
|
||||
available = 1;
|
||||
@ -195,16 +174,14 @@ class CfgVehicles {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
//class MFD {};
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
showHMD = 1;
|
||||
};
|
||||
|
||||
class CargoTurret_01: CargoTurret {};
|
||||
class CargoTurret_02: CargoTurret_01 {};
|
||||
};
|
||||
|
||||
/*class UserActions: UserActions {
|
||||
class DoorL1_Open {
|
||||
available = 1;
|
||||
@ -246,9 +223,9 @@ class CfgVehicles {
|
||||
lockDetectionSystem = 0;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
//class MFD {};
|
||||
weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher"};
|
||||
magazines[] = {"5000Rnd_762x51_Yellow_Belt","24Rnd_missiles","168Rnd_CMFlare_Chaff_Magazine"};
|
||||
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {
|
||||
canEject = 1;
|
||||
@ -268,36 +245,37 @@ class CfgVehicles {
|
||||
class I_Heli_light_03_F: I_Heli_light_03_base_F {
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {};
|
||||
|
||||
class CargoTurret_01: CargoTurret {};
|
||||
class CargoTurret_02: CargoTurret_01 {};
|
||||
};
|
||||
};
|
||||
|
||||
class I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {
|
||||
//class MFD {};
|
||||
};
|
||||
class I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {};
|
||||
|
||||
class I_Heli_light_03_unarmed_F: I_Heli_light_03_unarmed_base_F {};
|
||||
|
||||
class Plane_CAS_01_base_F: Plane_Base_F {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
//class MFD {};
|
||||
|
||||
class Turrets;
|
||||
|
||||
#include <flightmodel_thunderbolt.hpp>
|
||||
};
|
||||
|
||||
class Plane_CAS_02_base_F: Plane_Base_F {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
|
||||
class Turrets;
|
||||
|
||||
#include <flightmodel_yak.hpp>
|
||||
};
|
||||
|
||||
class Plane_Fighter_03_base_F: Plane_Base_F {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
|
||||
class Turrets;
|
||||
|
||||
#include <flightmodel_alca.hpp>
|
||||
};
|
||||
|
||||
@ -308,34 +286,34 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
class UAV_02_base_F: UAV {
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
|
||||
class Turrets {
|
||||
class MainTurret;
|
||||
};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
};
|
||||
|
||||
class UAV_02_CAS_base_F: UAV_02_base_F {
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
|
||||
/*class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {};
|
||||
};*/
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
};
|
||||
|
||||
class B_Heli_Transport_03_base_F: Helicopter_Base_H {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
};
|
||||
//class MainTurret: MainTurret {};
|
||||
class RightDoorGun: MainTurret {};
|
||||
|
||||
class CargoTurret_01: CargoTurret {};
|
||||
class CargoTurret_02: CargoTurret_01 {};
|
||||
};
|
||||
};
|
||||
|
||||
@ -346,9 +324,6 @@ class CfgVehicles {
|
||||
};
|
||||
//class MainTurret: MainTurret {};
|
||||
//class RightDoorGun: MainTurret {};
|
||||
|
||||
//class CargoTurret_01: CargoTurret {};
|
||||
//class CargoTurret_02: CargoTurret_01 {};
|
||||
};
|
||||
};
|
||||
|
||||
@ -356,6 +331,7 @@ class CfgVehicles {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
@ -374,15 +350,6 @@ class CfgVehicles {
|
||||
class LoadmasterTurret: LoadmasterTurret {
|
||||
canEject = 1;
|
||||
};
|
||||
|
||||
class CargoTurret_01: CargoTurret {};
|
||||
class CargoTurret_02: CargoTurret_01 {};
|
||||
class CargoTurret_03: CargoTurret_01 {};
|
||||
class CargoTurret_04: CargoTurret_01 {};
|
||||
class CargoTurret_05: CargoTurret_01 {};
|
||||
class CargoTurret_06: CargoTurret_05 {};
|
||||
class CargoTurret_07: CargoTurret_05 {};
|
||||
class CargoTurret_08: CargoTurret_05 {};
|
||||
};
|
||||
};
|
||||
|
||||
@ -394,9 +361,6 @@ class CfgVehicles {
|
||||
class LoadmasterTurret: LoadmasterTurret {
|
||||
canEject = 1;
|
||||
};
|
||||
|
||||
class CargoTurret_01: CargoTurret {};
|
||||
class CargoTurret_02: CargoTurret_01 {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -4,15 +4,10 @@ class Mode_Burst;
|
||||
class Mode_FullAuto;
|
||||
|
||||
class CfgWeapons {
|
||||
class MGunCore;
|
||||
class MGun: MGunCore {};
|
||||
|
||||
class LMG_RCWS: MGun {};
|
||||
|
||||
// Manual Switching Of Flare Mode
|
||||
class SmokeLauncher;
|
||||
class CMFlareLauncher: SmokeLauncher {
|
||||
modes[] = {"Single", "Burst", "AIBurst"};
|
||||
modes[] = {"Single","Burst","AIBurst"};
|
||||
class Single: Mode_SemiAuto {
|
||||
reloadTime = 0.1;
|
||||
};
|
||||
@ -21,13 +16,15 @@ class CfgWeapons {
|
||||
};
|
||||
};
|
||||
|
||||
// bigger mag for comanche
|
||||
class CannonCore;
|
||||
class gatling_20mm: CannonCore {
|
||||
magazines[] = {"2000Rnd_20mm_shells","1000Rnd_20mm_shells","300Rnd_20mm_shells","ACE_500Rnd_20mm_shells_Comanche"};
|
||||
magazines[] += {"ACE_500Rnd_20mm_shells_Comanche"};
|
||||
|
||||
// buff gatling rof
|
||||
class manual: CannonCore {
|
||||
reloadTime = 0.023;
|
||||
dispersion = 0.006;
|
||||
reloadTime = 0.023; //0.04;
|
||||
dispersion = 0.006; //0.0022;
|
||||
};
|
||||
class close: manual {};
|
||||
class short: close {};
|
||||
@ -36,21 +33,14 @@ class CfgWeapons {
|
||||
};
|
||||
|
||||
class ACE_gatling_20mm_Comanche: gatling_20mm {
|
||||
displayName = "XM301";
|
||||
class close: close {
|
||||
reloadTime = 0.04;
|
||||
dispersion = 0.0022;
|
||||
};
|
||||
class far: far {
|
||||
reloadTime = 0.04;
|
||||
dispersion = 0.0022;
|
||||
};
|
||||
displayName = "$STR_ACE_Aircraft_gatling_20mm_Name";
|
||||
|
||||
class manual: manual {
|
||||
reloadTime = 0.04;
|
||||
dispersion = 0.0022;
|
||||
displayName = "XM301";
|
||||
displayName = "$STR_ACE_Aircraft_gatling_20mm_Name";
|
||||
};
|
||||
class medium: medium {
|
||||
class close: close {
|
||||
reloadTime = 0.04;
|
||||
dispersion = 0.0022;
|
||||
};
|
||||
@ -58,38 +48,53 @@ class CfgWeapons {
|
||||
reloadTime = 0.04;
|
||||
dispersion = 0.0022;
|
||||
};
|
||||
class medium: medium {
|
||||
reloadTime = 0.04;
|
||||
dispersion = 0.0022;
|
||||
};
|
||||
class far: far {
|
||||
reloadTime = 0.04;
|
||||
dispersion = 0.0022;
|
||||
};
|
||||
};
|
||||
|
||||
// buff gatling rof
|
||||
class MGunCore;
|
||||
class MGun: MGunCore {};
|
||||
|
||||
class LMG_RCWS: MGun {};
|
||||
|
||||
class LMG_Minigun: LMG_RCWS {
|
||||
magazines[] = {"1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt"};
|
||||
class manual: MGun {
|
||||
reloadTime = 0.015;
|
||||
dispersion = 0.006;
|
||||
reloadTime = 0.075; //0.015;
|
||||
dispersion = 0.00093; //0.006;
|
||||
};
|
||||
class close: manual {};
|
||||
class short: close {};
|
||||
class medium: close {};
|
||||
class far: close {};
|
||||
};
|
||||
|
||||
class LMG_Minigun_heli: LMG_Minigun {
|
||||
showAimCursorInternal = 0;
|
||||
class manual: manual {
|
||||
reloadTime = 0.015;
|
||||
dispersion = 0.006;
|
||||
reloadTime = 0.015; //0.033; Note: This is a way to fast ROF (requires over 60 FPS) @todo
|
||||
dispersion = 0.006; //0.0087;
|
||||
};
|
||||
class close: manual {};
|
||||
class short: close {};
|
||||
class medium: close {};
|
||||
class far: close {};
|
||||
};
|
||||
|
||||
class M134_minigun: MGunCore {
|
||||
class LowROF: Mode_FullAuto {
|
||||
reloadTime = 0.015;
|
||||
dispersion = 0.006;
|
||||
reloadTime = 0.015; //0.03; same as above @todo
|
||||
dispersion = 0.006; //0.0023;
|
||||
};
|
||||
class HighROF: LowROF {
|
||||
reloadTime = 0.015;
|
||||
dispersion = 0.006;
|
||||
reloadTime = 0.015; //0.03;
|
||||
dispersion = 0.006; //0.0023;
|
||||
};
|
||||
class close: HighROF {};
|
||||
class short: close {};
|
||||
@ -100,19 +105,10 @@ class CfgWeapons {
|
||||
class Gatling_30mm_Plane_CAS_01_F: CannonCore {
|
||||
autoFire = 1;
|
||||
burst = 1;
|
||||
reloadTime = 0.0154;
|
||||
class LowROF: Mode_FullAuto {
|
||||
autoFire = 0;
|
||||
//burst = 65;
|
||||
burst = 22;
|
||||
//reloadTime = 0.0154;
|
||||
reloadTime = 0.0462;
|
||||
//sound[] = {"A3\Sounds_F_epc\weapons\cas_02_cannon",1.77828,1,3800};
|
||||
sound[] = {"A3\Sounds_F_EPC\Weapons\gau_03_burst",2.51189,1,4500,{25704,32159}};
|
||||
weaponSoundEffect = "DefaultRifle";
|
||||
dispersion = 0.005;
|
||||
soundContinuous = 1;
|
||||
textureType = "burst";
|
||||
burst = 22; //65;
|
||||
reloadTime = 0.0462; //0.0154; //0.034;
|
||||
multiplier = 3;
|
||||
};
|
||||
class close: LowROF {};
|
||||
@ -121,120 +117,4 @@ class CfgWeapons {
|
||||
class medium: close {};
|
||||
class far: close {};
|
||||
};
|
||||
|
||||
class RocketPods;
|
||||
class Missile_AA_04_Plane_CAS_01_F: RocketPods {
|
||||
holdsterAnimValue = 2;
|
||||
aiRateOfFire = 5;
|
||||
aiRateOfFireDistance = 500;
|
||||
autoFire = 0;
|
||||
cursor = "EmptyCursor";
|
||||
cursorAim = "missile";
|
||||
nameSound = "MissileLauncher";
|
||||
textureType = "fullAuto";
|
||||
weaponLockDelay = 3;
|
||||
minRange = 300;
|
||||
minRangeProbab = 0.25;
|
||||
midRange = 2500;
|
||||
midRangeProbab = 0.9;
|
||||
maxRange = 9000;
|
||||
maxRangeProbab = 0.01;
|
||||
};
|
||||
|
||||
class MissileLauncher;
|
||||
class Missile_AGM_02_Plane_CAS_01_F: MissileLauncher {
|
||||
holdsterAnimValue = 3;
|
||||
magazineReloadTime = 30;
|
||||
reloadTime = 0.001;
|
||||
textureType = "semi";
|
||||
weaponLockDelay = 3;
|
||||
weaponSoundEffect = "DefaultRifle";
|
||||
};
|
||||
|
||||
class Rocket_04_HE_Plane_CAS_01_F: RocketPods {
|
||||
holdsterAnimValue = 4;
|
||||
canLock = 1;
|
||||
modes[] = {"Far_AI","Medium_AI","Close_AI","Burst"};
|
||||
weaponLockDelay = 0;
|
||||
class Far_AI: RocketPods {
|
||||
canLock = 1;
|
||||
weaponLockDelay = 0;
|
||||
showToPlayer = 0;
|
||||
minRange = 800;
|
||||
minRangeProbab = 0.31;
|
||||
midRange = 2500;
|
||||
midRangeProbab = 0.71;
|
||||
maxRange = 3200;
|
||||
maxRangeProbab = 0.1;
|
||||
burst = 1;
|
||||
reloadTime = 0.001;
|
||||
autoFire = 0;
|
||||
aiRateOfFire = 5;
|
||||
aiRateOfFireDistance = 500;
|
||||
};
|
||||
class Medium_AI: Far_AI {};
|
||||
class Close_AI: Far_AI {};
|
||||
class Burst: RocketPods {
|
||||
burst = 1;
|
||||
reloadTime = 0.002;
|
||||
minRange = 300;
|
||||
minRangeProbab = 0.25;
|
||||
midRange = 400;
|
||||
midRangeProbab = 0.7;
|
||||
maxRange = 1300;
|
||||
maxRangeProbab = 0.1;
|
||||
aiRateOfFire = 5;
|
||||
aiRateOfFireDistance = 500;
|
||||
autoFire = 0;
|
||||
soundContinuous = 0;
|
||||
textureType = "fullAuto";
|
||||
weaponSoundEffect = "DefaultRifle";
|
||||
};
|
||||
};
|
||||
|
||||
class Rocket_04_AP_Plane_CAS_01_F: Rocket_04_HE_Plane_CAS_01_F {
|
||||
holdsterAnimValue = 5;
|
||||
};
|
||||
|
||||
class Bomb_04_Plane_CAS_01_F: RocketPods {
|
||||
holdsterAnimValue = 6;
|
||||
aiRateOfFire = 5;
|
||||
aiRateOfFireDistance = 500;
|
||||
missileLockCone = 180;
|
||||
nameSound = "";
|
||||
textureType = "fullAuto";
|
||||
weaponLockDelay = 1;
|
||||
};
|
||||
|
||||
class Cannon_30mm_Plane_CAS_02_F: CannonCore {
|
||||
scope = 1;
|
||||
holdsterAnimValue = 1;
|
||||
ballisticsComputer = 2;
|
||||
canLock = 1;
|
||||
modes[] = {"LowROF","close","near","short","medium","far"};
|
||||
nameSound = "cannon";
|
||||
shotFromTurret = 0;
|
||||
muzzlePos = "Cannon_muzzleflash";
|
||||
muzzleEnd = "Cannon_barrel_end";
|
||||
selectionFireAnim = "Cannon_muzzleflash";
|
||||
autoFire = 1;
|
||||
burst = 5;
|
||||
reloadTime = 0.04;
|
||||
class GunParticles {
|
||||
class Effect {
|
||||
effectName = "MachineGun2";
|
||||
positionName = "Cannon_barrel_start";
|
||||
directionName = "Cannon_barrel_end";
|
||||
};
|
||||
};
|
||||
class LowROF: Mode_FullAuto {
|
||||
dispersion = 0.0055;
|
||||
reloadTime = 0.04;
|
||||
};
|
||||
class close: LowROF {};
|
||||
class near: close {};
|
||||
class short: close {};
|
||||
class medium: close {};
|
||||
class far: close {};
|
||||
};
|
||||
};
|
||||
|
@ -6,7 +6,7 @@ class CfgPatches {
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"KoffeinFlummi","Crusty"};
|
||||
author[] = {"KoffeinFlummi","Crusty","commy2"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
|
@ -14,6 +14,18 @@
|
||||
<Portuguese>Rajada</Portuguese>
|
||||
<Italian>Raffica</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Aircraft_gatling_20mm_Name">
|
||||
<English>XM301</English>
|
||||
<German>XM301</German>
|
||||
<Spanish>XM301</Spanish>
|
||||
<Polish>XM301</Polish>
|
||||
<Czech>XM301</Czech>
|
||||
<French>XM301</French>
|
||||
<Russian>XM301</Russian>
|
||||
<Hungarian>XM301</Hungarian>
|
||||
<Portuguese>XM301</Portuguese>
|
||||
<Italian>XM301</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Aircraft_OpenCargoRamp">
|
||||
<English>Open Cargo Door</English>
|
||||
<German>Laderampe öffnen</German>
|
||||
@ -35,4 +47,4 @@
|
||||
<Russian>Закрыть грузовой отсек</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -1 +1 @@
|
||||
z\ace\Addons\laser
|
||||
z\ace\Addons\attach
|
@ -1,5 +1,6 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
@ -1,10 +1,12 @@
|
||||
|
||||
class CfgMagazines {
|
||||
class CA_Magazine;
|
||||
class B_IR_Grenade: CA_Magazine {
|
||||
ACE_Attachable = 1;
|
||||
};
|
||||
class SmokeShell;
|
||||
class Chemlight_green: SmokeShell {
|
||||
ACE_Attachable = 1;
|
||||
};
|
||||
};
|
||||
class CA_Magazine;
|
||||
class B_IR_Grenade: CA_Magazine {
|
||||
ACE_Attachable = 1;
|
||||
};
|
||||
|
||||
class SmokeShell;
|
||||
class Chemlight_green: SmokeShell {
|
||||
ACE_Attachable = 1;
|
||||
};
|
||||
};
|
||||
|
@ -1,104 +1,149 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
#define MACRO_ATTACHTOVEHICLE \
|
||||
class ACE_Actions { \
|
||||
class GVAR(AttachVehicle) { \
|
||||
displayName = "$STR_ACE_Attach_AttachDetach"; \
|
||||
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
|
||||
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 0; \
|
||||
icon = PATHTOF(UI\attach_ca.paa); \
|
||||
distance = 4; \
|
||||
}; \
|
||||
class GVAR(DetachVehicle) { \
|
||||
displayName = "$STR_ACE_Attach_Detach"; \
|
||||
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
|
||||
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 0; \
|
||||
icon = PATHTOF(UI\detach_ca.paa); \
|
||||
distance = 4; \
|
||||
}; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(Attach) {
|
||||
displayName = "$STR_ACE_Attach_AttachDetach";
|
||||
condition = QUOTE( [_player, ''] call FUNC(canAttach) );
|
||||
statement = QUOTE( [_player] call FUNC(openAttachUI); );
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\attach_ca.paa);
|
||||
hotkey = "T";
|
||||
class LandVehicle;
|
||||
class Car: LandVehicle {
|
||||
MACRO_ATTACHTOVEHICLE
|
||||
};
|
||||
|
||||
class Tank: LandVehicle {
|
||||
MACRO_ATTACHTOVEHICLE
|
||||
};
|
||||
|
||||
class Air;
|
||||
class Helicopter: Air {
|
||||
MACRO_ATTACHTOVEHICLE
|
||||
};
|
||||
|
||||
class Plane: Air {
|
||||
MACRO_ATTACHTOVEHICLE
|
||||
};
|
||||
|
||||
class Ship;
|
||||
class Ship_F: Ship {
|
||||
MACRO_ATTACHTOVEHICLE
|
||||
};
|
||||
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(Attach) {
|
||||
displayName = "$STR_ACE_Attach_AttachDetach";
|
||||
condition = QUOTE(([ARR_3(_player, _player, '')] call FUNC(canAttach)));
|
||||
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(openAttachUI); );
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\attach_ca.paa);
|
||||
hotkey = "T";
|
||||
};
|
||||
class GVAR(Detach) {
|
||||
displayName = "$STR_ACE_Attach_Detach";
|
||||
condition = QUOTE(([ARR_2(_player, _player)] call FUNC(canDetach)));
|
||||
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(detach) );
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\detach_ca.paa);
|
||||
hotkey = "T";
|
||||
};
|
||||
};
|
||||
};
|
||||
class GVAR(Detach) {
|
||||
displayName = "$STR_ACE_Attach_Detach";
|
||||
condition = QUOTE( [_player] call FUNC(canDetach) );
|
||||
statement = QUOTE( [_player] call FUNC(detach) );
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\detach_ca.paa);
|
||||
hotkey = "T";
|
||||
};
|
||||
|
||||
class All;
|
||||
class ACE_IR_Strobe_Effect: All {
|
||||
scope = 1;
|
||||
displayName = "IR Strobe";
|
||||
model = "\A3\Weapons_F\empty.p3d";
|
||||
simulation = "nvmarker";
|
||||
|
||||
class NVGMarker {
|
||||
diffuse[] = {0.006, 0.006, 0.006, 1};
|
||||
ambient[] = {0.005, 0.005, 0.005, 1};
|
||||
brightness = 0.2;
|
||||
name = "pozicni blik";
|
||||
drawLightSize = 0.2;
|
||||
drawLightCenterSize = 0.003;
|
||||
activeLight = 0;
|
||||
blinking=1;
|
||||
blinkingStartsOn=1;
|
||||
blinkingPattern[] = {2,2};
|
||||
blinkingPatternGuarantee = false;
|
||||
dayLight = 0;
|
||||
onlyInNvg = 1;
|
||||
useFlare = 0;
|
||||
};
|
||||
};
|
||||
|
||||
side = 7;//-1=NO_SIDE yellow box,3=CIV grey box,4=NEUTRAL yellow box,6=FRIENDLY green box,7=LOGIC no radar signature
|
||||
accuracy = 1000;
|
||||
cost = 0;
|
||||
armor = 500;
|
||||
threat[] = {0,0,0};
|
||||
nameSound = "";
|
||||
type = 0;
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
nvTarget = 1;
|
||||
destrType = "DestructNo";
|
||||
brightness = 20;
|
||||
};
|
||||
};
|
||||
|
||||
class All;
|
||||
class ACE_IR_Strobe_Effect: All {
|
||||
scope = 1;
|
||||
displayName = "IR Strobe";
|
||||
model = "\A3\Weapons_F\empty.p3d";
|
||||
simulation = "nvmarker";
|
||||
|
||||
class NVGMarker {
|
||||
diffuse[] = {0,0,0};
|
||||
ambient[] = {0,0,0};
|
||||
brightness = 0.004;
|
||||
name = "pozicni blik";
|
||||
drawLight = 1;
|
||||
drawLightSize = 0.005;
|
||||
drawLightCenterSize = 0.003;
|
||||
activeLight = 0;
|
||||
blinking=1;
|
||||
dayLight = 0;
|
||||
onlyInNvg = 1;
|
||||
useFlare = 0;
|
||||
class NATO_Box_Base;
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
|
||||
};
|
||||
};
|
||||
side = 7;//-1=NO_SIDE yellow box,3=CIV grey box,4=NEUTRAL yellow box,6=FRIENDLY green box,7=LOGIC no radar signature
|
||||
accuracy = 1000;
|
||||
cost = 0;
|
||||
armor = 500;
|
||||
threat[] = {0,0,0};
|
||||
nameSound = "";
|
||||
type = 0;
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
nvTarget = 1;
|
||||
destrType = "DestructNo";
|
||||
brightness = 20;
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
|
||||
class EAST_Box_Base;
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
|
||||
class IND_Box_Base;
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
|
||||
class FIA_Box_Base_F;
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,16 +1,19 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_IR_Strobe_Item: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_IrStrobe_Name";
|
||||
descriptionShort = "$STR_ACE_IrStrobe_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\irstrobe_item.paa);
|
||||
scope = 2;
|
||||
ACE_attachable = 1;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_IR_Strobe_Item: ACE_ItemCore {
|
||||
ACE_attachable = 1;
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
displayName = "$STR_ACE_IrStrobe_Name";
|
||||
descriptionShort = "$STR_ACE_IrStrobe_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\irstrobe_item.paa);
|
||||
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,7 +1,8 @@
|
||||
ace_attach
|
||||
==========
|
||||
|
||||
Introducing the ability to attach various throwables to yourself to mark your position and assist in IFF.
|
||||
Introducing the ability to attach various throwables to yourself or vehicles, to mark your position and assist in IFF.
|
||||
Adds item `ACE_IR_Strobe_Item`.
|
||||
|
||||
|
||||
## Maintainers
|
||||
@ -11,3 +12,4 @@ The people responsible for merging changes to this component or answering potent
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
||||
- [bux578](https://github.com/bux578)
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [PabstMirror](https://github.com/PabstMirror)
|
||||
|
@ -7,5 +7,7 @@ PREP(canAttach);
|
||||
PREP(canDetach);
|
||||
PREP(detach);
|
||||
PREP(openAttachUI);
|
||||
PREP(placeApprove);
|
||||
PREP(placeCancel);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,21 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_IR_Strobe_Item"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"KoffeinFlummi", "eRazeri", "CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_IR_Strobe_Item"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"KoffeinFlummi","eRazeri","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
@ -1,62 +1,90 @@
|
||||
/*
|
||||
* Author: eRazeri and CAA-Picard
|
||||
* Attach an item to the unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit doing the attach (player) <OBJECT>
|
||||
* 1: vehicle that it will be attached to (player or vehicle) <OBJECT>
|
||||
* 2: Name of the attachable item <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
Author: eRazeri and CAA-Picard
|
||||
PARAMS_3(_unit,_attachToVehicle,_itemName);
|
||||
|
||||
Attach an item to the unit
|
||||
//Sanity Check (_unit has item in inventory, not over attach limit)
|
||||
if !([_unit, _attachToVehicle, _itemName] call FUNC(canAttach)) exitWith {ERROR("Tried to attach, but check failed");};
|
||||
|
||||
Arguments:
|
||||
0: unit
|
||||
1: Item name
|
||||
private ["_itemVehClass", "_onAtachText", "_selfAttachPosition"];
|
||||
|
||||
Return Value:
|
||||
none
|
||||
*/
|
||||
_itemVehClass = "";
|
||||
_onAtachText = "";
|
||||
_selfAttachPosition = [_unit, [-0.05, 0, 0.12], "rightshoulder"];
|
||||
|
||||
private ["_unit", "_itemName", "_attachedItem"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_itemName = _this select 1;
|
||||
|
||||
// Check if unit has an attached item
|
||||
if (_unit getVariable [QGVAR(ItemName), ""] != "") exitWith {};
|
||||
|
||||
// Check if the unit still has the item
|
||||
if !((_itemName in items _unit) or (_itemName in magazines _unit)) exitWith {};
|
||||
|
||||
// Attach item
|
||||
switch true do {
|
||||
case (_itemName == "ACE_IR_Strobe_Item") : {
|
||||
_attachedItem = "ACE_IR_Strobe_Effect" createVehicle [0,0,0];
|
||||
_attachedItem attachTo [_unit,[0,-0.11,0.16],"pilot"];//makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri
|
||||
[localize "STR_ACE_Attach_IrStrobe_Attached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
case (_itemName == "B_IR_Grenade") : {
|
||||
_attachedItem = "B_IRStrobe" createVehicle [0,0,0];
|
||||
_attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"];
|
||||
[localize "STR_ACE_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
case (_itemName == "O_IR_Grenade") : {
|
||||
_attachedItem = "O_IRStrobe" createVehicle [0,0,0];
|
||||
_attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"];
|
||||
[localize "STR_ACE_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
case (_itemName == "I_IR_Grenade") : {
|
||||
_attachedItem = "I_IRStrobe" createVehicle [0,0,0];
|
||||
_attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"];
|
||||
[localize "STR_ACE_Attach_IrGrenade_Attached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : {
|
||||
_attachedItem = _itemName createVehicle [0,0,0];
|
||||
_attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"];
|
||||
[localize "STR_ACE_Attach_Chemlight_Attached"] call EFUNC(common,displayTextStructured);;
|
||||
};
|
||||
default {
|
||||
if (true) exitWith {};
|
||||
};
|
||||
switch (true) do {
|
||||
case (_itemName == "ACE_IR_Strobe_Item"): {
|
||||
_itemVehClass = "ACE_IR_Strobe_Effect";
|
||||
_onAtachText = localize "STR_ACE_Attach_IrStrobe_Attached";
|
||||
//_selfAttachPosition = [_unit, [0, -0.11, 0.16], "pilot"]; //makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri
|
||||
};
|
||||
case (_itemName == "B_IR_Grenade"): {
|
||||
_itemVehClass = "B_IRStrobe";
|
||||
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
|
||||
};
|
||||
case (_itemName == "O_IR_Grenade"): {
|
||||
_itemVehClass = "O_IRStrobe";
|
||||
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
|
||||
};
|
||||
case (_itemName == "I_IR_Grenade"): {
|
||||
_itemVehClass = "I_IRStrobe";
|
||||
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
|
||||
};
|
||||
case (toLower _itemName in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]): {
|
||||
_itemVehClass = _itemName;
|
||||
_onAtachText = localize "STR_ACE_Attach_Chemlight_Attached";
|
||||
};
|
||||
};
|
||||
|
||||
// Remove item
|
||||
_unit removeItem _itemName;
|
||||
_unit setVariable [QGVAR(ItemName), _itemName, true];
|
||||
_unit setVariable [QGVAR(Item), _attachedItem, true];
|
||||
if (_itemVehClass == "") exitWith {ERROR("no _itemVehClass for Item");};
|
||||
|
||||
if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
_unit removeItem _itemName; // Remove item
|
||||
_attachedItem = _itemVehClass createVehicle [0,0,0];
|
||||
_attachedItem attachTo _selfAttachPosition;
|
||||
[_onAtachText] call EFUNC(common,displayTextStructured);
|
||||
_attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true];
|
||||
_attachToVehicle setVariable [QGVAR(ItemNames), [_itemName], true];
|
||||
} else {
|
||||
GVAR(setupObject) = _itemVehClass createVehicleLocal [0,0,-10000];
|
||||
GVAR(setupObject) enableSimulationGlobal false;
|
||||
GVAR(SetupPlacmentText) = _onAtachText;
|
||||
GVAR(SetupPlacmentItem) = _itemName;
|
||||
GVAR(SetupAttachVehicle) = _attachToVehicle;
|
||||
GVAR(placer) = _unit;
|
||||
[_unit, QGVAR(vehAttach), true] call EFUNC(common,setForceWalkStatus);
|
||||
|
||||
[QGVAR(PlacementEachFrame),"OnEachFrame", {
|
||||
private "_player";
|
||||
_player = ACE_player;
|
||||
//Stop if player switch or player gets to far from vehicle
|
||||
if (GVAR(placer) != _player || {_player distance GVAR(SetupAttachVehicle) > 7}) exitWith {
|
||||
call FUNC(placeCancel);
|
||||
};
|
||||
GVAR(pfeh_running) = true;
|
||||
_pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]);
|
||||
GVAR(setupObject) setPosATL _pos;
|
||||
}] call BIS_fnc_addStackedEventHandler; // @todo replace with CBA PFH
|
||||
|
||||
//had to delay the mouseHint, not sure why
|
||||
[{[localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] call EFUNC(interaction,showMouseHint)}, [], 0, 0] call EFUNC(common,waitAndExecute);
|
||||
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeApprove);}] call EFUNC(common,AddActionEventHandler)];
|
||||
_unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
|
||||
};
|
||||
|
@ -1,21 +1,27 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Check if a unit can attach a specific item.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Unit that wants to attach the object (Object)
|
||||
* 1: Name of the attachable item (String)
|
||||
*
|
||||
* Return value:
|
||||
* Boolean (Bool)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit doing the attach (player) <OBJECT>
|
||||
* 1: vehicle that it will be attached to (player or vehicle) <OBJECT>
|
||||
* 2: Name of the attachable item <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_item"];
|
||||
PARAMS_3(_unit,_attachToVehicle,_item);
|
||||
|
||||
_unit = _this select 0;
|
||||
_item = _this select 1;
|
||||
private ["_attachLimit", "_attachedObjects"];
|
||||
|
||||
canStand _unit && {_unit getVariable [QGVAR(ItemName), ""] == ""} && {_item in (magazines _unit + items _unit + [""])}
|
||||
_attachLimit = [10, 1] select (_unit == _attachToVehicle);
|
||||
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||
|
||||
canStand _unit && {alive _attachToVehicle} && {count _attachedObjects < _attachLimit} && {_item in (itemsWithMagazines _unit + [""])}
|
||||
|
@ -1,19 +1,40 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Check if a unit has an item attached and if it can remove that item.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Unit that wants to detach something (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Boolean (Bool)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit doing the detaching (player) <STRING>
|
||||
* 1: vehicle that it will be detached from (player or vehicle) <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_unit";
|
||||
PARAMS_2(_unit,_attachToVehicle);
|
||||
|
||||
_unit = _this select 0;
|
||||
private ["_attachedObjects", "_inRange"];
|
||||
|
||||
canStand _unit && {_unit getVariable [QGVAR(ItemName), ""] != ""}
|
||||
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||
|
||||
_inRange = false;
|
||||
if (_unit == _attachToVehicle) then {
|
||||
_inRange = count _attachedObjects > 0;
|
||||
} else {
|
||||
//Scan if unit is within range (using 2d distance)
|
||||
private ["_unitPos", "_objectPos"];
|
||||
_unitPos = getPos _unit;
|
||||
_unitPos set [2,0];
|
||||
{
|
||||
_objectPos = getPos _x;
|
||||
_objectPos set [2, 0];
|
||||
if (_objectPos distance _unitPos < 4) exitWith {_inRange = true};
|
||||
} forEach _attachedObjects;
|
||||
};
|
||||
|
||||
canStand _unit && {_inRange} && {alive _attachToVehicle}
|
||||
|
@ -1,63 +1,86 @@
|
||||
/*
|
||||
* Author: eRazeri and CAA-Picard
|
||||
* Detach an item from a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit doing the attaching (player) <STRING>
|
||||
* 1: vehicle that it will be detached from (player or vehicle) <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
Author: eRazeri and CAA-Picard
|
||||
PARAMS_2(_unit,_attachToVehicle);
|
||||
|
||||
Detach an item from a unit
|
||||
private ["_attachedObjects", "_attachedItems"];
|
||||
|
||||
Arguments:
|
||||
unit
|
||||
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||
_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];
|
||||
|
||||
Return Value:
|
||||
none
|
||||
*/
|
||||
private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"];
|
||||
|
||||
private ["_unit", "_itemName", "_count", "_attachedItem", "_fnc_detachDelay"];
|
||||
_attachedObject = objNull;
|
||||
_attachedIndex = -1;
|
||||
_itemName = "";
|
||||
|
||||
_unit = _this select 0;
|
||||
_itemName = _unit getVariable [QGVAR(ItemName), ""];
|
||||
_attachedItem = _unit getVariable [QGVAR(Item), objNull];
|
||||
//Find closest attached object
|
||||
_minDistance = 1000;
|
||||
_unitPos = getPos _unit;
|
||||
_unitPos set [2,0];
|
||||
{
|
||||
_objectPos = getPos _x;
|
||||
_objectPos set [2, 0];
|
||||
if (_objectPos distance _unitPos < _minDistance) then {
|
||||
_minDistance = _objectPos distance _unitPos;
|
||||
_attachedObject = _x;
|
||||
_itemName = _attachedItems select _forEachIndex;
|
||||
_attachedIndex = _forEachIndex;
|
||||
};
|
||||
} forEach _attachedObjects;
|
||||
|
||||
// Check if unit has an attached item
|
||||
if (_itemName == "") exitWith {};
|
||||
if (isNull _attachedObject || {_itemName == ""}) exitWith {ERROR("Could not find attached object")};
|
||||
|
||||
// Add item to inventory
|
||||
_count = (count items _unit) + (count magazines _unit);
|
||||
_unit addItem _itemName;
|
||||
if ((count items _unit) + (count magazines _unit) <= _count) exitWith {
|
||||
[localize "STR_ACE_Attach_Inventory_Full"] call EFUNC(common,displayTextStructured);
|
||||
// Exit if can't add the item
|
||||
if !(_unit canAdd _itemName) exitWith {
|
||||
[localize "STR_ACE_Attach_Inventory_Full"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
if (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") then {
|
||||
// Hack for dealing with X_IR_Grenade effect not dissapearing on deleteVehicle
|
||||
detach _attachedItem;
|
||||
_attachedItem setPos [getPos _unit select 0, getPos _unit select 1, ((getPos _unit select 2) - 1000)];
|
||||
// Delete attached item after 0.5 seconds
|
||||
_fnc_detachDelay = {
|
||||
deleteVehicle (_this select 0);
|
||||
};
|
||||
[_fnc_detachDelay, [_attachedItem], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
// Add item to inventory
|
||||
_unit addItem _itemName;
|
||||
|
||||
if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then {
|
||||
// Hack for dealing with X_IR_Grenade effect not dissapearing on deleteVehicle
|
||||
detach _attachedObject;
|
||||
_attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
|
||||
// Delete attached item after 0.5 seconds
|
||||
[{deleteVehicle (_this select 0)}, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
// Delete attached item
|
||||
deleteVehicle _attachedItem;
|
||||
// Delete attached item
|
||||
deleteVehicle _attachedObject;
|
||||
};
|
||||
|
||||
// Reset unit variables
|
||||
_unit setVariable [QGVAR(ItemName),"", true];
|
||||
_unit setVariable [QGVAR(Item),nil, true];
|
||||
_attachedObjects deleteAt _attachedIndex;
|
||||
_attachedItems deleteAt _attachedIndex;
|
||||
_attachToVehicle setVariable [QGVAR(Objects), _attachedObjects, true];
|
||||
_attachToVehicle setVariable [QGVAR(ItemNames), _attachedItems, true];
|
||||
|
||||
// Display message
|
||||
switch true do {
|
||||
case (_itemName == "ACE_IR_Strobe_Item") : {
|
||||
[localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : {
|
||||
[localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : {
|
||||
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
default {
|
||||
if (true) exitWith {};
|
||||
};
|
||||
switch (true) do {
|
||||
case (_itemName == "ACE_IR_Strobe_Item") : {
|
||||
[localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
case (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) : {
|
||||
[localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
case (toLower _itemName in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]) : {
|
||||
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
};
|
||||
|
@ -1,63 +1,67 @@
|
||||
/*
|
||||
* Author: Garth de Wet (LH)
|
||||
* Opens the UI for attaching objects.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit <STRING>
|
||||
* 1: target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
Author: Garth de Wet (LH)
|
||||
private ["_actions", "_attachables", "_item"];
|
||||
|
||||
Description:
|
||||
Opens the UI for attaching objects.
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
Parameters:
|
||||
0: OBJECT - unit
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
|
||||
Example:
|
||||
[player] call ACE_Attach_fnc_openAttachUI;
|
||||
*/
|
||||
private ["_unit", "_actions", "_attachables", "_item"];
|
||||
_unit = _this select 0;
|
||||
GVAR(attachTarget) = _target;
|
||||
_listed = [];
|
||||
_attachables = magazines _unit;
|
||||
_actions = [localize "STR_ACE_Attach_AttachDetach", localize "STR_ACE_Attach_Attach"] call EFUNC(interaction,prepareSelectMenu);
|
||||
{
|
||||
if !(_x in _listed) then {
|
||||
_item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
if (getNumber (_item >> "ACE_Attachable") == 1) then {
|
||||
_actions = [
|
||||
_actions,
|
||||
getText(_item >> "displayName"),
|
||||
getText(_item >> "picture"),
|
||||
_x
|
||||
] call EFUNC(interaction,addSelectableItem);
|
||||
if !(_x in _listed) then {
|
||||
_item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
if (getNumber (_item >> "ACE_Attachable") == 1) then {
|
||||
_actions = [
|
||||
_actions,
|
||||
getText(_item >> "displayName"),
|
||||
getText(_item >> "picture"),
|
||||
_x
|
||||
] call EFUNC(interaction,addSelectableItem);
|
||||
};
|
||||
_listed pushBack _x;
|
||||
};
|
||||
_listed pushBack _x;
|
||||
};
|
||||
} forEach _attachables;
|
||||
_attachables = items _unit;
|
||||
{
|
||||
if !(_x in _listed) then {
|
||||
_item = ConfigFile >> "CfgWeapons" >> _x;
|
||||
if (getNumber (_item >> "ACE_Attachable") == 1) then {
|
||||
_actions = [
|
||||
_actions,
|
||||
getText(_item >> "displayName"),
|
||||
getText(_item >> "picture"),
|
||||
_x
|
||||
] call EFUNC(interaction,addSelectableItem);
|
||||
if !(_x in _listed) then {
|
||||
_item = ConfigFile >> "CfgWeapons" >> _x;
|
||||
if (getNumber (_item >> "ACE_Attachable") == 1) then {
|
||||
_actions = [
|
||||
_actions,
|
||||
getText(_item >> "displayName"),
|
||||
getText(_item >> "picture"),
|
||||
_x
|
||||
] call EFUNC(interaction,addSelectableItem);
|
||||
};
|
||||
_listed pushBack _x;
|
||||
};
|
||||
_listed pushBack _x;
|
||||
};
|
||||
} forEach _attachables;
|
||||
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[ACE_player, _this] call FUNC(attach);
|
||||
call EFUNC(interaction,hideMenu);
|
||||
},
|
||||
{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
|
||||
}
|
||||
_actions,
|
||||
{
|
||||
[ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
|
||||
call EFUNC(interaction,hideMenu);
|
||||
},
|
||||
{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
|
||||
}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
|
110
addons/attach/functions/fnc_placeApprove.sqf
Normal file
110
addons/attach/functions/fnc_placeApprove.sqf
Normal file
@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Author: Pabst Mirror (based on Explosive attach by Garth de Wet (LH))
|
||||
* Approves placement of the lightObject, scans for an appropriate location and attaches
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_setupObject", "_setupClassname", "_itemClassname", "_placementText", "_attachToVehicle", "_placer", "_startingPosition", "_startingOffset", "_distanceFromCenter", "_closeInUnitVector", "_keepGoingCloser", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"];
|
||||
|
||||
|
||||
if (GVAR(pfeh_running)) then {
|
||||
[QGVAR(PlacementEachFrame),"OnEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||
GVAR(pfeh_running) = false;
|
||||
};
|
||||
|
||||
_setupObject = GVAR(setupObject);
|
||||
_setupClassname = typeOf _setupObject;
|
||||
_itemClassname = GVAR(SetupPlacmentItem);
|
||||
_placementText = GVAR(SetupPlacmentText);
|
||||
_attachToVehicle = GVAR(SetupAttachVehicle);
|
||||
_placer = GVAR(placer);
|
||||
|
||||
GVAR(SetupPlacmentItem) = "";
|
||||
GVAR(SetupPlacmentText) = "";
|
||||
GVAR(setupObject) = objNull;
|
||||
GVAR(SetupAttachVehicle) = objNull;
|
||||
GVAR(placer) = objNull;
|
||||
|
||||
[_placer, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
|
||||
[_placer, "DefaultAction", _placer getVariable [QGVAR(placeActionEH), -1]] call EFUNC(common,removeActionEventHandler);
|
||||
[_placer, "MenuBack", _placer getVariable [QGVAR(cancelActionEH), -1]] call EFUNC(common,removeActionEventHandler);
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
|
||||
//A player can release the attachObject with it floating in mid-air.
|
||||
//This will use lineIntersectsWith to scan towards the center of the vehicle to find a collision
|
||||
//ArmA's collision detection is of couse terrible and often misses collisions (difference between what we see and collision LOD)
|
||||
//So it does multiple scans at slighly different angles
|
||||
//This is VERY computationaly intensive, but doesn't happen that often.
|
||||
|
||||
_startingPosition = _setupObject modelToWorld [0,0,0];
|
||||
_startingOffset = _attachToVehicle worldToModel _startingPosition;
|
||||
|
||||
_distanceFromCenter = vectorMagnitude _startingOffset;
|
||||
_closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]);
|
||||
_keepGoingCloser = true;
|
||||
_closeInDistance = 0;
|
||||
|
||||
while {_keepGoingCloser} do {
|
||||
if (_closeInDistance >= _distanceFromCenter) exitWith {};
|
||||
|
||||
_closeInDistance = _closeInDistance + 0.01; //10mm each step
|
||||
_endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
_endPosTestOffset set [2, (_startingOffset select 2)];
|
||||
_endPosTest = _attachToVehicle modelToWorld _endPosTestOffset;
|
||||
|
||||
{
|
||||
_startingPosShifted = _startingPosition vectorAdd _x;
|
||||
_startASL = if (surfaceIsWater _startingPosShifted) then {_startingPosShifted} else {ATLtoASL _startingPosShifted};
|
||||
{
|
||||
_endPosShifted = _endPosTest vectorAdd _x;
|
||||
_endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted};
|
||||
|
||||
//Uncomment to see the lazor show, and see how the scanning works:
|
||||
drawLine3D [_startingPosShifted, _endPosShifted, [1,0,0,1]];
|
||||
|
||||
if (_attachToVehicle in lineIntersectsWith [_startASL, _endASL, _placer, _setupObject]) exitWith {_keepGoingCloser = false};
|
||||
} forEach [[0,0,0.045], [0,0,-0.045], [0,0.045,0], [0,-0.045,0], [0.045,0,0], [-0.045,0,0]];
|
||||
} forEach [[0,0,0], [0,0,0.05], [0,0,-0.05]];
|
||||
};
|
||||
|
||||
//Delete Local Placement Object
|
||||
deleteVehicle _setupObject;
|
||||
|
||||
//Checks
|
||||
if ((_closeInDistance >= _distanceFromCenter) || (!([_placer,_attachToVehicle,_itemClassname] call FUNC(canAttach)))) exitWith {
|
||||
TRACE_2("no valid spot found",_closeInDistance,_distanceFromCenter);
|
||||
[localize "STR_ACE_Attach_Failed"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
//Move it out slightly, for visability sake (better to look a little funny than be embedded//sunk in the hull)
|
||||
_closeInDistance = (_closeInDistance - 0.0085);
|
||||
|
||||
//Create New 'real' Object
|
||||
_endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
|
||||
_endPosTestOffset set [2, (_startingOffset select 2)];
|
||||
_attachedObject = _setupClassname createVehicle (getPos _placer);
|
||||
_attachedObject attachTo [_attachToVehicle, _endPosTestOffset];
|
||||
|
||||
//Remove Item from inventory
|
||||
_placer removeItem _itemClassname;
|
||||
|
||||
//Add Object to ACE_AttachedObjects and ACE_AttachedItemNames
|
||||
_currentObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
|
||||
_currentObjects pushBack _attachedObject;
|
||||
_attachToVehicle setVariable [QGVAR(Objects), _currentObjects, true];
|
||||
_currentItemNames = _attachToVehicle getVariable [QGVAR(ItemNames), []];
|
||||
_currentItemNames pushBack _itemClassname;
|
||||
_attachToVehicle setVariable [QGVAR(ItemNames), _currentItemNames, true];
|
||||
|
||||
[_placementText] call EFUNC(common,displayTextStructured);
|
35
addons/attach/functions/fnc_placeCancel.sqf
Normal file
35
addons/attach/functions/fnc_placeCancel.sqf
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Author: Pabst Mirror (based on Explosive attach by Garth de Wet (LH))
|
||||
* Cancels placement of the lightObject
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (GVAR(pfeh_running)) then {
|
||||
[QGVAR(PlacementEachFrame),"OnEachFrame"] call BIS_fnc_removeStackedEventHandler;
|
||||
GVAR(pfeh_running) = false;
|
||||
};
|
||||
if (!isNull (GVAR(setupObject))) then {
|
||||
deleteVehicle GVAR(setupObject);
|
||||
};
|
||||
|
||||
[GVAR(placer), QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
[GVAR(placer), "DefaultAction", GVAR(placer) getVariable [QGVAR(placeActionEH), -1]] call EFUNC(common,removeActionEventHandler);
|
||||
[GVAR(placer), "MenuBack", GVAR(placer) getVariable [QGVAR(cancelActionEH), -1]] call EFUNC(common,removeActionEventHandler);
|
||||
|
||||
GVAR(placer) = objNull;
|
||||
GVAR(SetupPlacmentItem) = "";
|
||||
GVAR(SetupPlacmentText) = "";
|
||||
GVAR(setupObject) = objNull;
|
||||
GVAR(SetupAttachVehicle) = objNull;
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-12 -->
|
||||
<!-- Edited with tabler - 2015-01-31 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Attach">
|
||||
<Key ID="STR_ACE_Attach_AttachDetach">
|
||||
@ -146,5 +146,34 @@
|
||||
<Hungarian>Az infravörös jeladóval megjelölheted a helyzetedet úgy, hogy annak pulzáló fénye csak éjjellátó készülékkel látható.</Hungarian>
|
||||
<Russian>ИК строб позволяет сигнализировать свое местоположение через пульсирующий маяк, видимый только через ПНВ.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Attach_PlaceAction">
|
||||
<English>Place</English>
|
||||
<German>Platzieren</German>
|
||||
<Spanish>Colocar</Spanish>
|
||||
<Polish>Umieść</Polish>
|
||||
<French>Placer</French>
|
||||
<Czech>Položit</Czech>
|
||||
<Portuguese>Colocar</Portuguese>
|
||||
<Italian>Posiziona</Italian>
|
||||
<Hungarian>Elhelyez</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Attach_CancelAction">
|
||||
<English>Cancel</English>
|
||||
<German>Abbrechen</German>
|
||||
<Spanish>Cancelar</Spanish>
|
||||
<Polish>Anuluj</Polish>
|
||||
<French>Annuler</French>
|
||||
<Czech>Zrušit</Czech>
|
||||
<Portuguese>Cancelar</Portuguese>
|
||||
<Italian>Annulla</Italian>
|
||||
<Hungarian>Mégse</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Attach_Failed">
|
||||
<English>Attach Failed</English>
|
||||
<French>Échec du Attacher</French>
|
||||
<German>Befestigen Fehlgeschlagen</German>
|
||||
<Russian>Присоединить Ошибка</Russian>
|
||||
<Spanish>Error en Acoplar</Spanish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -1 +0,0 @@
|
||||
z\ace\addons\backblast
|
@ -1,17 +0,0 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredNear_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(LauncherBackblast) {
|
||||
FiredNear = QUOTE( if (local (_this select 0) && {getNumber (configfile >> 'CfgWeapons' >> _this select 3 >> 'ACE_Backblast_Damage') > 0}) then {_this call FUNC(launcherBackblast)} );
|
||||
};
|
||||
class GVAR(TankDangerZone) {
|
||||
FiredNear = QUOTE( if (local (_this select 0) && {getNumber (configfile >> 'CfgWeapons' >> _this select 3 >> 'ACE_DangerZone_Damage') > 0}) then {_this call FUNC(tankDangerZone)} );
|
||||
};
|
||||
};
|
||||
};
|
@ -1,44 +0,0 @@
|
||||
class CfgWeapons {
|
||||
|
||||
class LauncherCore;
|
||||
class Launcher: LauncherCore {
|
||||
ACE_Backblast_Angle = 60;
|
||||
ACE_Backblast_Range = 10;
|
||||
ACE_Backblast_Damage = 0.7;
|
||||
};
|
||||
class Launcher_Base_F: Launcher {};
|
||||
|
||||
class launch_Titan_base: Launcher_Base_F {
|
||||
ACE_Backblast_Angle = 40;
|
||||
ACE_Backblast_Range = 8;
|
||||
ACE_Backblast_Damage = 0.5;
|
||||
};
|
||||
class launch_Titan_short_base: launch_Titan_base {
|
||||
ACE_Backblast_Angle = 40;
|
||||
ACE_Backblast_Range = 8;
|
||||
ACE_Backblast_Damage = 0.5;
|
||||
};
|
||||
|
||||
class launch_NLAW_F: Launcher_Base_F {
|
||||
ACE_Backblast_Angle = 40;
|
||||
ACE_Backblast_Range = 5;
|
||||
ACE_Backblast_Damage = 0.6;
|
||||
};
|
||||
class launch_RPG32_F: Launcher_Base_F {
|
||||
ACE_Backblast_Angle = 60;
|
||||
ACE_Backblast_Range = 15;
|
||||
ACE_Backblast_Damage = 0.7;
|
||||
};
|
||||
|
||||
class CannonCore;
|
||||
class cannon_120mm: CannonCore {
|
||||
ACE_DangerZone_Angle = 90;
|
||||
ACE_DangerZone_Range = 50;
|
||||
ACE_DangerZone_Damage = 0.85;
|
||||
};
|
||||
class mortar_155mm_AMOS: CannonCore {
|
||||
ACE_DangerZone_Angle = 90;
|
||||
ACE_DangerZone_Range = 60;
|
||||
ACE_DangerZone_Damage = 1;
|
||||
};
|
||||
};
|
@ -1,31 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_position", "_direction", "_maxDistance", "_distance", "_iteration", "_laser", "_line"];
|
||||
|
||||
_position = + _this select 0;
|
||||
_direction = + _this select 1;
|
||||
_maxDistance = _this select 2;
|
||||
|
||||
_distance = _maxDistance;
|
||||
_iteration = _distance;
|
||||
_laser = [];
|
||||
_line = [_position, _laser];
|
||||
|
||||
while {
|
||||
_iteration > 0.1
|
||||
} do {
|
||||
_iteration = _iteration / 2;
|
||||
|
||||
_laser set [0, (_position select 0) - _distance * (_direction select 0)];
|
||||
_laser set [1, (_position select 1) - _distance * (_direction select 1)];
|
||||
_laser set [2, (_position select 2) - _distance * (_direction select 2)];
|
||||
|
||||
_intersections = {
|
||||
_x isKindOf "Static" || {_x isKindOf "AllVehicles"}
|
||||
} count (lineIntersectsWith _line);
|
||||
|
||||
_distance = _distance + ([1, -1] select (_intersections > 0)) * _iteration;
|
||||
};
|
||||
|
||||
if (_distance > _maxDistance) then {999} else {_distance}
|
@ -1,72 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
_unit = _this select 0;
|
||||
_firer = _this select 1;
|
||||
_distance = _this select 2;
|
||||
_weapon = _this select 3;
|
||||
|
||||
if (vehicle _unit != _unit || {!([_firer] call EFUNC(common,isPlayer))}) exitWith {};
|
||||
|
||||
_backblastAngle = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Angle") / 2;
|
||||
_backblastRange = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Range");
|
||||
_backblastDamage = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_Backblast_Damage");
|
||||
|
||||
_position = eyePos _firer;
|
||||
_direction = _firer weaponDirection currentWeapon _firer;
|
||||
|
||||
if (_unit == _firer) then {
|
||||
_distance = [_position, _direction, _backblastRange] call FUNC(getDistance);
|
||||
hint format ["%1", _distance];
|
||||
if (_distance < _backblastRange) then {
|
||||
_alpha = sqrt (1 - _distance / _backblastRange);
|
||||
_beta = sqrt 0.5;
|
||||
|
||||
_damage = 2 * _alpha * _beta * _backblastDamage;
|
||||
[_damage * 100] call BIS_fnc_bloodEffect;
|
||||
|
||||
// TODO: Sort this interaction with medical
|
||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
||||
[_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
||||
} else {
|
||||
_unit setDamage (damage _unit + _damage);
|
||||
};
|
||||
|
||||
};
|
||||
} else {
|
||||
_direction = [0, 0, 0] vectorDiff _direction;
|
||||
|
||||
_azimuth = (_direction select 0) atan2 (_direction select 1);
|
||||
_inclination = asin (_direction select 2);
|
||||
|
||||
_relativePosition = eyePos _unit;
|
||||
_relativeDirection = _relativePosition vectorDiff _position;
|
||||
|
||||
_relativeAzimuth = (_relativeDirection select 0) atan2 (_relativeDirection select 1);
|
||||
_relativeInclination = asin (_relativeDirection select 2);
|
||||
|
||||
_angle = sqrt ((_relativeAzimuth - _azimuth) ^ 2 + (_relativeInclination - _inclination) ^ 2);
|
||||
_distance = vectorMagnitude _relativeDirection;
|
||||
|
||||
_line = [_position, _relativePosition];
|
||||
|
||||
if (_angle < _backblastAngle && {_distance < _backblastRange} && {!lineIntersects _line} && {!terrainIntersectASL _line}) then {
|
||||
_alpha = sqrt (1 - _distance / _backblastRange);
|
||||
_beta = sqrt (1 - _angle / _backblastAngle);
|
||||
|
||||
_damage = 2 * _alpha * _beta * _backblastDamage;
|
||||
if (_unit == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
|
||||
|
||||
// TODO: Sort this interaction with medical
|
||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
||||
[_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
||||
_unit spawn {
|
||||
sleep 0.5;
|
||||
[_this, "", 0, objNull, objNull] call EFUNC(medical,handleDamage);
|
||||
};
|
||||
} else {
|
||||
_unit setDamage (damage _unit + _damage);
|
||||
};
|
||||
|
||||
};
|
||||
};
|
@ -1,54 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define BARREL_MUZZLE "usti hlavne"
|
||||
|
||||
_unit = _this select 0;
|
||||
_vehicle = vehicle (_this select 1);
|
||||
_distance = _this select 2;
|
||||
_weapon = _this select 3;
|
||||
|
||||
if (vehicle _unit != _unit || {!([gunner _firer] call EFUNC(common,isPlayer))}) exitWith {};
|
||||
|
||||
_dangerZoneAngle = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Angle") / 2;
|
||||
_dangerZoneRange = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Range");
|
||||
_dangerZoneDamage = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ACE_DangerZone_Damage");
|
||||
|
||||
_position = ATLToASL (_vehicle modelToWorld (_vehicle selectionPosition BARREL_MUZZLE));
|
||||
_direction = _vehicle weaponDirection _weapon;
|
||||
|
||||
if (_unit != _vehicle) then {
|
||||
_azimuth = (_direction select 0) atan2 (_direction select 1);
|
||||
_inclination = asin (_direction select 2);
|
||||
|
||||
_relativePosition = eyePos _unit;
|
||||
_relativeDirection = _relativePosition vectorDiff _position;
|
||||
|
||||
_relativeAzimuth = (_relativeDirection select 0) atan2 (_relativeDirection select 1);
|
||||
_relativeInclination = asin (_relativeDirection select 2);
|
||||
|
||||
_angle = sqrt ((_relativeAzimuth - _azimuth) ^ 2 + (_relativeInclination - _inclination) ^ 2);
|
||||
_distance = vectorMagnitude _relativeDirection;
|
||||
|
||||
_line = [_position, _relativePosition];
|
||||
|
||||
if (_angle < _dangerZoneAngle && {_distance < _dangerZoneRange} && {!lineIntersects (_line + [_vehicle])} && {!terrainIntersectASL _line}) then {
|
||||
_alpha = sqrt (1 - _distance / _dangerZoneRange);
|
||||
_beta = sqrt (1 - _angle / _dangerZoneAngle);
|
||||
|
||||
_damage = 2 * _alpha * _beta * _dangerZoneDamage;
|
||||
if (_unit == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
|
||||
|
||||
// TODO: Sort this interaction with medical
|
||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
||||
[_unit, "HitBody", ([_unit, "", ((_unit getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
||||
_unit spawn {
|
||||
sleep 0.5;
|
||||
[_this, "", 0, objNull, objNull] call EFUNC(medical,handleDamage);
|
||||
};
|
||||
} else {
|
||||
_unit setDamage (damage _unit + _damage);
|
||||
};
|
||||
|
||||
};
|
||||
};
|
@ -1 +0,0 @@
|
||||
#include "\z\ace\addons\backblast\script_component.hpp"
|
@ -1,12 +0,0 @@
|
||||
#define COMPONENT backblast
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_BACKBLAST
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_BACKBLAST
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_BACKBLAST
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
1
addons/captives/$PBOPREFIX$
Normal file
1
addons/captives/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\captives
|
48
addons/captives/CfgEventHandlers.hpp
Normal file
48
addons/captives/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,48 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
//release escorted captive when entering a vehicle
|
||||
class Extended_GetIn_EventHandlers {
|
||||
class All {
|
||||
class GVAR(AutoDetachCaptive) {
|
||||
getIn = QUOTE(_this call FUNC(handleGetIn));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//reset captive animation after leaving vehicle
|
||||
class Extended_GetOut_EventHandlers {
|
||||
class All {
|
||||
class GVAR(AutoDetachCaptive) {
|
||||
getOut = QUOTE(_this call FUNC(handleGetOut));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//reset captivity and escorting status when getting killed
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(AutoDetachCaptive) {
|
||||
killed = QUOTE(_this call FUNC(handleKilled));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//mission start
|
||||
class Extended_InitPost_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(InitPost) {
|
||||
init = QUOTE(_this call FUNC(handleUnitInitPost));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
83
addons/captives/CfgMoves.hpp
Normal file
83
addons/captives/CfgMoves.hpp
Normal file
@ -0,0 +1,83 @@
|
||||
class CfgMovesBasic {
|
||||
class Actions {
|
||||
class CivilStandActions;
|
||||
class ACE_CivilStandHandcuffedActions: CivilStandActions {
|
||||
turnL = "";
|
||||
turnR = "";
|
||||
stop = "ACE_AmovPercMstpScapWnonDnon";
|
||||
StopRelaxed = "ACE_AmovPercMstpScapWnonDnon";
|
||||
default = "ACE_AmovPercMstpScapWnonDnon";
|
||||
PutDown = "";
|
||||
getOver = "";
|
||||
throwPrepare = "";
|
||||
throwGrenade[] = {"","Gesture"};
|
||||
};
|
||||
class ACE_CivilStandSurrenderActions: ACE_CivilStandHandcuffedActions {
|
||||
stop = "ACE_AmovPercMstpSsurWnonDnon";
|
||||
StopRelaxed = "ACE_AmovPercMstpSsurWnonDnon";
|
||||
default = "ACE_AmovPercMstpSsurWnonDnon";
|
||||
PutDown = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class StandBase;
|
||||
class States {
|
||||
class AmovPercMstpSnonWnonDnon: StandBase {
|
||||
ConnectTo[] += {"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
|
||||
};
|
||||
|
||||
class CutSceneAnimationBase;
|
||||
|
||||
//Handcuffed Anims:
|
||||
class ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon: CutSceneAnimationBase {
|
||||
actions = "ACE_CivilStandHandcuffedActions";
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_EaseIn";
|
||||
speed = 1;
|
||||
looped = 0;
|
||||
interpolationRestart = 2;
|
||||
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||
};
|
||||
class ACE_AmovPercMstpScapWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease";
|
||||
speed = 0;
|
||||
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01};
|
||||
looped = 1;
|
||||
};
|
||||
class ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
|
||||
actions = "CivilStandActions";
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\amovpercmstpsnonwnondnon_easeout";
|
||||
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
|
||||
};
|
||||
|
||||
//Surrender Anims:
|
||||
class ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon: CutSceneAnimationBase {
|
||||
actions = "ACE_CivilStandSurrenderActions";
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
|
||||
speed = 1;
|
||||
looped = 0;
|
||||
interpolationRestart = 2;
|
||||
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||
};
|
||||
class ACE_AmovPercMstpSsurWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon";
|
||||
speed = 0;
|
||||
looped = 1;
|
||||
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01};
|
||||
};
|
||||
class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||
speed = 0.333; //for gameplay reasons, slow this down
|
||||
actions = "CivilStandActions";
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
||||
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
191
addons/captives/CfgVehicles.hpp
Normal file
191
addons/captives/CfgVehicles.hpp
Normal file
@ -0,0 +1,191 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_Actions {
|
||||
class ACE_ApplyHandcuffs {
|
||||
displayName = "$STR_ACE_Captives_SetCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
hotkey = "C";
|
||||
};
|
||||
class ACE_RemoveHandcuffs {
|
||||
displayName = "$STR_ACE_Captives_ReleaseCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
hotkey = "R";
|
||||
};
|
||||
class ACE_EscortCaptive {
|
||||
displayName = "$STR_ACE_Captives_EscortCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive));
|
||||
statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.3;
|
||||
hotkey = "E";
|
||||
};
|
||||
class ACE_StopEscorting {
|
||||
displayName = "$STR_ACE_Captives_StopEscorting";
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
|
||||
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.3;
|
||||
hotkey = "E";
|
||||
};
|
||||
class ACE_LoadCaptive {
|
||||
displayName = "$STR_ACE_Captives_LoadCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
|
||||
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.2;
|
||||
hotkey = "L";
|
||||
};
|
||||
class ACE_FriskPerson {
|
||||
displayName = "$STR_ACE_Captives_FriskPerson";
|
||||
distance = 2;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson));
|
||||
showDisabled = 0;
|
||||
//icon = ""; //@todo
|
||||
priority = 3;
|
||||
hotkey = "F";
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_SelfActions {
|
||||
class ACE_StopEscortingSelf {
|
||||
displayName = "$STR_ACE_Captives_StopEscorting";
|
||||
condition = QUOTE([ARR_2(_player, objNull)] call FUNC(canStopEscorting));
|
||||
statement = QUOTE([ARR_3(_player,objNull, false)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
showDisabled = 0;
|
||||
priority = 2.3;
|
||||
hotkey = "C";
|
||||
};
|
||||
class ACE_StartSurrenderingSelf {
|
||||
displayName = "$STR_ACE_Captives_StartSurrendering";
|
||||
condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender));
|
||||
statement = QUOTE([ARR_2(_player, true)] call FUNC(surrender));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
};
|
||||
class ACE_StopSurrenderingSelf {
|
||||
displayName = "$STR_ACE_Captives_StopSurrendering";
|
||||
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
|
||||
statement = QUOTE([ARR_2(_player, false)] call FUNC(surrender));
|
||||
exceptions[] = {QGVAR(isNotSurrendering)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#define MACRO_LOADUNLOADCAPTIVE \
|
||||
class ACE_Actions { \
|
||||
class ACE_LoadCaptive { \
|
||||
displayName = "$STR_ACE_Captives_LoadCaptive"; \
|
||||
distance = 4; \
|
||||
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
|
||||
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
|
||||
exceptions[] = {QGVAR(isNotEscorting)}; \
|
||||
showDisabled = 0; \
|
||||
priority = 1.2; \
|
||||
hotkey = "L"; \
|
||||
}; \
|
||||
class ACE_UnloadCaptive { \
|
||||
displayName = "$STR_ACE_Captives_UnloadCaptive"; \
|
||||
distance = 4; \
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \
|
||||
showDisabled = 0; \
|
||||
priority = 1.2; \
|
||||
hotkey = "C"; \
|
||||
}; \
|
||||
};
|
||||
|
||||
class LandVehicle;
|
||||
class Car: LandVehicle {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
class Tank: LandVehicle {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
class Air;
|
||||
class Helicopter: Air {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
class Plane: Air {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
class Ship;
|
||||
class Ship_F: Ship {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
class StaticWeapon: LandVehicle {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
class StaticMortar;
|
||||
class Mortar_01_base_F: StaticMortar {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_CableTie,12)
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class Logic;
|
||||
class Module_F: Logic {
|
||||
class ArgumentsBaseUnits {};
|
||||
class ModuleDescription {};
|
||||
};
|
||||
|
||||
class GVAR(ModuleSurrender): Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Make Unit Surrender";
|
||||
function = QUOTE(DFUNC(moduleSurrender));
|
||||
scope = 2; //show in editor
|
||||
scopeCurator = 2; //show in zeus
|
||||
curatorCost = 0; //???
|
||||
isGlobal = 1; //run global
|
||||
isTriggerActivated = 1; //Wait for triggers
|
||||
// icon = QUOTE(PATHTOF(ui\todo.paa));
|
||||
functionPriority = 0;
|
||||
class Arguments {};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = "Sync a unit to make them surrender.<br/>Source: ace_captives";
|
||||
sync[] = {"AnyAI"};
|
||||
};
|
||||
};
|
||||
};
|
15
addons/captives/CfgWeapons.hpp
Normal file
15
addons/captives/CfgWeapons.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_CableTie: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_Captives_CableTie";
|
||||
descriptionShort = "$STR_ACE_Captives_CableTieDescription";
|
||||
model = QUOTE(PATHTOF(models\ace_cabletie.p3d));
|
||||
picture = QUOTE(PATHTOF(UI\ace_cabletie_ca.paa));
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
14
addons/captives/README.md
Normal file
14
addons/captives/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
ace_captives
|
||||
============
|
||||
|
||||
Allows taking people captive/handcuffed
|
||||
|
||||
####Items:
|
||||
`ACE_CableTie` - adds ability to take someone captive
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [PabstMirror](https://github.com/PabstMirror)
|
32
addons/captives/XEH_postInit.sqf
Normal file
32
addons/captives/XEH_postInit.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
||||
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//Handles when someone starts escorting and then disconnects, leaving the captive attached
|
||||
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
|
||||
if (isServer) then {
|
||||
addMissionEventHandler ["HandleDisconnect", {
|
||||
PARAMS_1(_disconnectedPlayer);
|
||||
_escortedUnit = _disconnectedPlayer getVariable [QGVAR(escortedUnit), objNull];
|
||||
if ((!isNull _escortedUnit) && {(attachedTo _escortedUnit) == _disconnectedPlayer}) then {
|
||||
detach _escortedUnit;
|
||||
systemChat "debug: DC detach";
|
||||
};
|
||||
if (_disconnectedPlayer getVariable [QGVAR(isEscorting), false]) then {
|
||||
_disconnectedPlayer setVariable [QGVAR(isEscorting), false, true];
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
||||
//TODO: Medical Integration Events???
|
||||
|
||||
// [_unit, "knockedOut", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
|
||||
// [_unit, "wokeUp", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
32
addons/captives/XEH_preInit.sqf
Normal file
32
addons/captives/XEH_preInit.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(canApplyHandcuffs);
|
||||
PREP(canEscortCaptive);
|
||||
PREP(canFriskPerson);
|
||||
PREP(canLoadCaptive);
|
||||
PREP(canRemoveHandcuffs);
|
||||
PREP(canStopEscorting);
|
||||
PREP(canSurrender);
|
||||
PREP(canUnloadCaptive);
|
||||
PREP(doApplyHandcuffs);
|
||||
PREP(doEscortCaptive);
|
||||
PREP(doFriskPerson);
|
||||
PREP(doLoadCaptive);
|
||||
PREP(doRemoveHandcuffs);
|
||||
PREP(doUnloadCaptive);
|
||||
PREP(handleGetIn);
|
||||
PREP(handleGetOut);
|
||||
PREP(handleKilled);
|
||||
PREP(handleKnockedOut);
|
||||
PREP(handlePlayerChanged);
|
||||
PREP(handleUnitInitPost);
|
||||
PREP(handleWokeUp);
|
||||
PREP(moduleSurrender);
|
||||
PREP(setHandcuffed);
|
||||
PREP(surrender);
|
||||
PREP(vehicleCaptiveMoveIn);
|
||||
PREP(vehicleCaptiveMoveOut);
|
||||
|
||||
ADDON = true;
|
31
addons/captives/config.cpp
Normal file
31
addons/captives/config.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {QGVAR(ModuleSurrender)};
|
||||
weapons[] = {"ACE_CableTie"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ACE_Interaction"};
|
||||
author[] = {"commy2", "KoffeinFlummi"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMoves.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
class ACE_canInteractConditions {
|
||||
class GVAR(isNotEscorting) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isEscorting),false)));
|
||||
};
|
||||
class GVAR(isNotHandcuffed) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isHandcuffed),false)));
|
||||
};
|
||||
class GVAR(isNotSurrendering) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isSurrendering),false)));
|
||||
};
|
||||
};
|
25
addons/captives/functions/fnc_canApplyHandcuffs.sqf
Normal file
25
addons/captives/functions/fnc_canApplyHandcuffs.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Checks the conditions for being able to apply handcuffs
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caller (player) <OBJECT>
|
||||
* 1: target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob] call ACE_captives_fnc_canApplyHandcuffs
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
//Player has cableTie, target is alive and not already handcuffed
|
||||
|
||||
("ACE_CableTie" in (items _unit)) &&
|
||||
{alive _target} &&
|
||||
{!(_target getVariable [QGVAR(isHandcuffed), false])}
|
26
addons/captives/functions/fnc_canEscortCaptive.sqf
Normal file
26
addons/captives/functions/fnc_canEscortCaptive.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Tests if can escort target (attach)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caller (player) <OBJECT>
|
||||
* 1: target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob] call ACE_captives_fnc_canEscortCaptive
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
//Alive, handcuffed, not being escored, and not unconscious
|
||||
|
||||
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
||||
{isNull (attachedTo _target)} &&
|
||||
{alive _target} &&
|
||||
{!(_target getVariable ["ACE_isUnconscious", false])}
|
24
addons/captives/functions/fnc_canFriskPerson.sqf
Normal file
24
addons/captives/functions/fnc_canFriskPerson.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: bux578
|
||||
* Checks the conditions for being able to frisk a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caller (player) <OBJECT>
|
||||
* 1: target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob] call ACE_captives_fnc_canFriskPerson
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
_target getVariable [QGVAR(isHandcuffed), false]
|
||||
|| {_target getVariable [QGVAR(isSurrendering), false]}
|
||||
|| {_target getVariable ["ACE_isSearchable", false]}
|
||||
|| {_target getVariable ["ACE_isUnconscious", false]}
|
39
addons/captives/functions/fnc_canLoadCaptive.sqf
Normal file
39
addons/captives/functions/fnc_canLoadCaptive.sqf
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Check if the unit can load the target object into a vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that wants to load a captive <OBJECT>
|
||||
* 1: A captive. ObjNull for the first escorted captive (may be null) <OBJECT>
|
||||
* 2: Vehicle to load the captive into. ObjNull for the nearest vehicle (may be null) <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob] call ACE_captives_fnc_canLoadCaptive
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_objects"];
|
||||
|
||||
PARAMS_3(_unit,_target,_vehicle);
|
||||
|
||||
if (isNull _target) then {
|
||||
_objects = attachedObjects _unit;
|
||||
_objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
||||
if ((count _objects) > 0) then {_target = _objects select 0;};
|
||||
};
|
||||
|
||||
if (isNull _vehicle) then {
|
||||
_objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship_F"], 10];
|
||||
if ((count _objects) > 0) then {_vehicle = _objects select 0;};
|
||||
};
|
||||
|
||||
(!isNull _target)
|
||||
&& {!isNull _vehicle}
|
||||
&& {_unit getVariable [QGVAR(isEscorting), false]}
|
||||
&& {_target getVariable [QGVAR(isHandcuffed), false]}
|
||||
&& {_vehicle emptyPositions "cargo" > 0}
|
23
addons/captives/functions/fnc_canRemoveHandcuffs.sqf
Normal file
23
addons/captives/functions/fnc_canRemoveHandcuffs.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Checks the conditions for being able to remove handcuffs
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caller (player) <OBJECT>
|
||||
* 1: target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob] call ACE_captives_fnc_canRemoveHandcuffs
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
//Unit is handcuffed and not currently being escorted
|
||||
_target getVariable [QGVAR(isHandcuffed), false] &&
|
||||
{isNull (attachedTo _target)}
|
40
addons/captives/functions/fnc_canStopEscorting.sqf
Normal file
40
addons/captives/functions/fnc_canStopEscorting.sqf
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Tests if player can stop escorting
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caller (player) <OBJECT>
|
||||
* 1: target <OBJECT><OPTIONAL>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob] call ACE_captives_fnc_canStopEscorting
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
DEFAULT_PARAM(1,_target,objNull);
|
||||
|
||||
private ["_isAttached"];
|
||||
|
||||
if (isNull _target) then {
|
||||
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
||||
};
|
||||
|
||||
if (isNull _target) exitWith {
|
||||
ERROR("Null Target (no ACE_escortedUnit)");
|
||||
false
|
||||
};
|
||||
|
||||
_isAttached = _target in (attachedObjects _unit);
|
||||
|
||||
if (_isAttached && (!(_target getVariable [QGVAR(isHandcuffed), false]))) exitWith {
|
||||
ERROR("Attached But Not Captive");
|
||||
false
|
||||
};
|
||||
|
||||
_isAttached
|
22
addons/captives/functions/fnc_canSurrender.sqf
Normal file
22
addons/captives/functions/fnc_canSurrender.sqf
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Checks the conditions for being able to surrender
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caller (player) <OBJECT>
|
||||
* 1: New Surrender State to test <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [Jean, true] call ACE_captives_fnc_canSurrender;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_newSurrenderState);
|
||||
|
||||
//TODO: any other conditions??
|
||||
(!((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _newSurrenderState))
|
28
addons/captives/functions/fnc_canUnloadCaptive.sqf
Normal file
28
addons/captives/functions/fnc_canUnloadCaptive.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Check if the unit can unload a captive from the vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that wants to unload a captive <OBJECT>
|
||||
* 1: A captive. ObjNull for the first escorted captive <OBJECT>
|
||||
* 2: Vehicle to unload a captive from <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob, car1] call ACE_captives_fnc_canUnloadCaptive;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_cargo"];
|
||||
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
|
||||
_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
|
||||
|
||||
_cargo = [_cargo, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
||||
|
||||
count _cargo > 0
|
25
addons/captives/functions/fnc_doApplyHandcuffs.sqf
Normal file
25
addons/captives/functions/fnc_doApplyHandcuffs.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Checks the conditions for being able to apply handcuffs
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caller (player) <OBJECT>
|
||||
* 1: target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob] call ACE_captives_fnc_doApplyHandcuffs;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
_unit removeItem "ACE_CableTie";
|
||||
|
||||
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
||||
|
||||
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
|
59
addons/captives/functions/fnc_doEscortCaptive.sqf
Normal file
59
addons/captives/functions/fnc_doEscortCaptive.sqf
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Author: Nic547
|
||||
* Attaches a Captive to the _unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _unit-Player <OBJECT>
|
||||
* 1: target <OBJECT>
|
||||
* 2: _state <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob, true] call ACE_captives_fnc_doEscorteCaptive;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_unit,_target,_state);
|
||||
|
||||
if (_state) then {
|
||||
if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {};
|
||||
|
||||
[_unit, _target] call EFUNC(common,claim);
|
||||
_unit setVariable [QGVAR(isEscorting), true, true];
|
||||
|
||||
_target attachTo [_unit, [0, 1, 0]];
|
||||
|
||||
_unit setVariable [QGVAR(escortedUnit), _target, true];
|
||||
|
||||
//Add Actionmenu to release captive
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize "STR_ACE_Captives_StopEscorting"],
|
||||
{[(_this select 0), ((_this select 0) getVariable [QGVAR(escortedUnit), objNull]), false] call FUNC(doEscortCaptive);},
|
||||
nil, 20, false, true, "", QUOTE(!isNull (GETVAR(_target,QGVAR(escortedUnit),objNull)))];
|
||||
|
||||
private "_escortFnc";
|
||||
_escortFnc = {
|
||||
EXPLODE_3_PVT((_this select 0),_unit,_target,_actionID);
|
||||
if (_unit getVariable [QGVAR(isEscorting), false]) then {
|
||||
if (!alive _target || {!alive _unit} || {!canStand _target} || {!canStand _unit} || {_target getVariable ["ACE_isUnconscious", false]} || {_unit getVariable ["ACE_isUnconscious", false]} || {!isNull (attachedTo _unit)}) then {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
};
|
||||
};
|
||||
|
||||
if (!(_unit getVariable [QGVAR(isEscorting), false])) then {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
[objNull, _target] call EFUNC(common,claim);
|
||||
detach _target;
|
||||
_unit removeAction _actionID;
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
};
|
||||
};
|
||||
[_escortFnc, 0.2, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
};
|
70
addons/captives/functions/fnc_doFriskPerson.sqf
Normal file
70
addons/captives/functions/fnc_doFriskPerson.sqf
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Author: bux578
|
||||
* Open the select menu with the "personal" items of a frisked unit. It only shows "handgunWeapon", "uniformItems", "vestItems", "backpackItems" and "assignedItems" because every other item is visible on the character
|
||||
*
|
||||
* Arguments:
|
||||
* 0: player unit <OBJECT>
|
||||
* 1: unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player, bob] call ACE_captives_fnc_doFristPerson;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_weapon", "_listedItemClasses", "_actions", "_allGear"];
|
||||
|
||||
PARAMS_2(_player,_unit);
|
||||
|
||||
_weapon = currentWeapon _player;
|
||||
if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
|
||||
[_player, "AmovPercMstpSlowWrflDnon", 0] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
_listedItemClasses = [];
|
||||
|
||||
_actions = [localize "STR_ACE_Captives_FriskMenuHeader", localize "STR_ACE_Captives_CancelSelection"] call ACE_Interaction_fnc_prepareSelectMenu;
|
||||
|
||||
_allGear = [];
|
||||
|
||||
if ((handgunWeapon _unit) != "") then {
|
||||
_allGear pushBack (handgunWeapon _unit);
|
||||
};
|
||||
if (count (uniformItems _unit) > 0) then {
|
||||
_allGear = _allGear + (uniformItems _unit);
|
||||
};
|
||||
if (count (vestItems _unit) > 0) then {
|
||||
_allGear = _allGear + (vestItems _unit);
|
||||
};
|
||||
if (count (backpackItems _unit) > 0) then {
|
||||
_allGear = _allGear + (backpackItems _unit);
|
||||
};
|
||||
if (count (assignedItems _unit) > 0) then {
|
||||
_allGear = _allGear + (assignedItems _unit);
|
||||
};
|
||||
|
||||
// Handgun
|
||||
// Uniform Items
|
||||
// Vest Items
|
||||
// Backpack Items
|
||||
// Assigned Items
|
||||
{
|
||||
if (!(_x in _listedItemClasses)) then {
|
||||
private "_item";
|
||||
_item = configFile >> "CfgMagazines" >> _x;
|
||||
if (isNil "_item" || str _item == "") then { //str _item ?
|
||||
_item = configFile >> "CfgWeapons" >> _x;
|
||||
};
|
||||
_actions = [_actions, getText(_item >> "displayName"), getText(_item >> "picture"), _x] call ACE_Interaction_fnc_addSelectableItem;
|
||||
_listedItemClasses pushBack _x;
|
||||
};
|
||||
} forEach (_allGear);
|
||||
|
||||
[_actions, {call ACE_Interaction_fnc_hideMenu;}, {call ACE_Interaction_fnc_hideMenu;}] call ACE_Interaction_fnc_openSelectMenu;
|
||||
|
||||
// don't need an "Ok" Button
|
||||
ctrlShow [8860, false];
|
38
addons/captives/functions/fnc_doLoadCaptive.sqf
Normal file
38
addons/captives/functions/fnc_doLoadCaptive.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Unit loads the target object into a vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that wants to load a captive <OBJECT>
|
||||
* 1: A captive. ObjNull for the first escorted captive <OBJECT>
|
||||
* 2: Vehicle to load the captive into. ObjNull for the nearest vehicle <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, tom, car] call ACE_captives_fnc_doLoadCaptive
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_unit,_target,_vehicle);
|
||||
|
||||
if (isNull _target) then {
|
||||
_objects = attachedObjects _unit;
|
||||
_objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
||||
if ((count _objects) > 0) then {_target = _objects select 0;};
|
||||
};
|
||||
if (isNull _target) exitWith {};
|
||||
|
||||
if (isNull _vehicle) then {
|
||||
_objects = nearestObjects [_unit, ["Car_F", "Tank_F", "Helicopter_F", "Boat_F", "Plane_F"], 10];
|
||||
if ((count _objects) > 0) then {_vehicle = _objects select 0;};
|
||||
};
|
||||
if (isNull _vehicle) exitWith {};
|
||||
|
||||
if ((!isNil "_target") && {!isNil "_vehicle"}) then {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
["MoveInCaptive", [_target], [_target, _vehicle]] call EFUNC(common,targetEvent);
|
||||
};
|
20
addons/captives/functions/fnc_doRemoveHandcuffs.sqf
Normal file
20
addons/captives/functions/fnc_doRemoveHandcuffs.sqf
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Remove handcuffs from a target
|
||||
*
|
||||
* Arguments:
|
||||
* 0: target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob, false] call ACE_captives_fnc_doRemoveHandcuffs
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);
|
32
addons/captives/functions/fnc_doUnloadCaptive.sqf
Normal file
32
addons/captives/functions/fnc_doUnloadCaptive.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Unit unloads a captive from a vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that wants to unload a captive <OBJECT>
|
||||
* 1: Vehicle to unload a captive from. <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, car] call ACE_captives_fnc_doUnloadCaptive
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
|
||||
private ["_cargo", "_target"];
|
||||
|
||||
_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
|
||||
|
||||
_cargo = [_cargo, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
||||
|
||||
if ((count _cargo) > 0) then {
|
||||
_target = _cargo select 0;
|
||||
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
|
||||
} else {
|
||||
ERROR("No captive to unload");
|
||||
};
|
24
addons/captives/functions/fnc_handleGetIn.sqf
Normal file
24
addons/captives/functions/fnc_handleGetIn.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Handles when a unit gets in to a vehicle. Release escorted captive when entering a vehicle
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _vehicle <OBJECT>
|
||||
* 2: dunno <OBJECT>
|
||||
* 1: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [car2, x, player] call ACE_captives_fnc_handleGetIn
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
||||
|
||||
if ((local _unit) && (_unit getVariable [QGVAR(isEscorting), false])) then {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
};
|
33
addons/captives/functions/fnc_handleGetOut.sqf
Normal file
33
addons/captives/functions/fnc_handleGetOut.sqf
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Handles when a captive unit gets out of a vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _vehicle <OBJECT>
|
||||
* 2: dunno <OBJECT>
|
||||
* 1: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [car2, x, player] call ACE_captives_fnc_handleGetOut
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
||||
|
||||
if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
|
||||
private ["_cargoIndex"];
|
||||
|
||||
_cargoIndex = _unit getVariable [QGVAR(CargoIndex), -1];
|
||||
|
||||
//If captive was not "unloaded", then move them back into the vehicle.
|
||||
if (_cargoIndex != -1) exitWith {
|
||||
_unit moveInCargo [_vehicle, _cargoIndex];
|
||||
};
|
||||
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
30
addons/captives/functions/fnc_handleKilled.sqf
Normal file
30
addons/captives/functions/fnc_handleKilled.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Handles when a unit is kill. Reset captivity and escorting status
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _oldUnit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [bob1] call ACE_captives_fnc_handleKilled
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_oldUnit);
|
||||
|
||||
if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then {
|
||||
_oldUnit setVariable [QGVAR(isHandcuffed), false, true];
|
||||
};
|
||||
|
||||
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
|
||||
_oldUnit setVariable [QGVAR(isEscorting), false, true];
|
||||
};
|
||||
|
||||
if (_oldUnit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
_oldUnit setVariable [QGVAR(isSurrendering), false, true];
|
||||
};
|
27
addons/captives/functions/fnc_handlePlayerChanged.sqf
Normal file
27
addons/captives/functions/fnc_handlePlayerChanged.sqf
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Handles playerChanged. Resets "showHUD" based on handcuff status
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _newUnit <OBJECT>
|
||||
* 1: _oldUnit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob1, bob2] call ACE_captives_fnc_handlePlayerChange
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_newUnit,_oldUnit);
|
||||
|
||||
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_newUnit);
|
||||
showHUD false;
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_newUnit);
|
||||
showHUD true;
|
||||
};
|
34
addons/captives/functions/fnc_handleUnitInitPost.sqf
Normal file
34
addons/captives/functions/fnc_handleUnitInitPost.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* handle captive and unconsciousness state and prevent grenades
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ACE_captives_fnc_handleUnitInitPost
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
// prevent players from throwing grenades (added to all units)
|
||||
[_unit, "Throw", {((_this select 1) getVariable [QGVAR(isHandcuffed), false]) || {(_this select 1) getVariable [QGVAR(isSurrendering), false]}}, {}] call EFUNC(common,addActionEventhandler);
|
||||
|
||||
if (local _unit) then {
|
||||
// reset status on mission start
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
|
||||
_unit setVariable [QGVAR(isHandcuffed), false];
|
||||
[_unit, true] call FUNC(setHandcuffed);
|
||||
};
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
_unit setVariable [QGVAR(isSurrendering), false];
|
||||
[_unit, true] call FUNC(surrender);
|
||||
};
|
||||
};
|
23
addons/captives/functions/fnc_handleWokeUp.sqf
Normal file
23
addons/captives/functions/fnc_handleWokeUp.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* TODO
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ACE_captives_fnc_handleWokeUp
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 0] call EFUNC(common,doAnimation);
|
||||
};
|
46
addons/captives/functions/fnc_moduleSurrender.sqf
Normal file
46
addons/captives/functions/fnc_moduleSurrender.sqf
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Module Function to make a unit surrender (can be called from editor, or placed with zeus)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Module Logic Object <OBJECT>
|
||||
* 1: synced objects <ARRAY>
|
||||
* 2: Activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* Called from module
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_logic,_units,_activated);
|
||||
|
||||
if (!_activated) exitWith {};
|
||||
|
||||
if (local _logic) then {
|
||||
if ((!isnull curatorcamera) && {((count curatorMouseOver) == 2) && {(curatorMouseOver select 1) == _logic}}) then {//in zeus interface and we placed the module
|
||||
_bisMouseOver = missionNamespace getVariable ["bis_fnc_curatorObjectPlaced_mouseOver", []];//bis caches the previous curatorMouseOver
|
||||
if ((count _bisMouseOver) == 2) then {//check what mouse was over before the module was placed
|
||||
_mouseOverObject = _bisMouseOver select 1;
|
||||
if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then {
|
||||
systemChat format ["Debug - module surrendering %1", (name _mouseOverObject)];
|
||||
[_mouseOverObject, true] call FUNC(surrender);
|
||||
} else {
|
||||
systemChat format ["Only use on dismounted inf"];
|
||||
};
|
||||
} else {
|
||||
systemChat format ["Nothing under mouse"];
|
||||
};
|
||||
} else {//an editor module
|
||||
{
|
||||
systemChat format ["Debug - module surrendering %1", (name _x)];
|
||||
[_x, true] call FUNC(surrender);
|
||||
} forEach _units;
|
||||
};
|
||||
|
||||
deleteVehicle _logic;
|
||||
};
|
63
addons/captives/functions/fnc_setHandcuffed.sqf
Normal file
63
addons/captives/functions/fnc_setHandcuffed.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Author: Nic547, commy2
|
||||
* Handcuffs a unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: True to take captive, false to release captive <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, true] call ACE_captives_fnc_setHandcuffed;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_state);
|
||||
|
||||
// We only want this function to work on local machines
|
||||
if (!local _unit) exitwith {
|
||||
[_this, QUOTE(FUNC(setHandcuffed)), _unit] call EFUNC(common,execRemoteFnc);
|
||||
TRACE_2("running setHandcuffed on remote unit",_unit,_state);
|
||||
};
|
||||
|
||||
if (_state isEqualTo (_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
||||
LOG("setHandcuffed: current state same as new");
|
||||
};
|
||||
|
||||
if (_state) then {
|
||||
_unit setVariable [QGVAR(isHandcuffed), true, true];
|
||||
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
|
||||
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
};
|
||||
|
||||
// fix anim on mission start (should work on dedicated servers)
|
||||
[{
|
||||
PARAMS_1(_unit);
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isHandcuffed), false, true];
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
if ((vehicle _unit) == _unit) then {
|
||||
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
if (_unit getVariable [QGVAR(CargoIndex), -1] != -1) then {
|
||||
_unit setVariable [QGVAR(CargoIndex), -1, true];
|
||||
};
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD true;
|
||||
};
|
||||
};
|
76
addons/captives/functions/fnc_surrender.sqf
Normal file
76
addons/captives/functions/fnc_surrender.sqf
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Author: commy2 PabstMirror
|
||||
* Lets a unit surrender
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: State <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [Pierre, true] call ACE_captives_fnc_surrender;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_state);
|
||||
|
||||
// We only want this function to work on local machines
|
||||
if (!local _unit) exitwith {
|
||||
[_this, QUOTE(FUNC(surrender)), _unit] call EFUNC(common,execRemoteFnc);
|
||||
TRACE_2("running surrender on remote unit",_unit,_state);
|
||||
};
|
||||
|
||||
if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) then {
|
||||
LOG("Surrender: current state same as new");
|
||||
};
|
||||
|
||||
if (_state) then {
|
||||
_unit setVariable [QGVAR(isSurrendering), true, true];
|
||||
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
};
|
||||
|
||||
// fix anim on mission start (should work on dedicated servers)
|
||||
[{
|
||||
PARAMS_1(_unit);
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
|
||||
|
||||
//PFEH - (TODO: move to event system?)
|
||||
[{
|
||||
EXPLODE_1_PVT((_this select 0),_unit);
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
//If unit dies, gets knocked out, or is handcuffed then end surrender
|
||||
if ((!alive _unit) || {_unit getVariable ["ACE_isUnconscious", false]} || {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
|
||||
[_unit, false] call FUNC(surrender);
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
} else {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
}, 0.0, [_unit]] call CBA_fnc_addPerFrameHandler;
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isSurrendering), false, true];
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
if ((vehicle _unit) == _unit) then {
|
||||
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
//only re-enable HUD if not handcuffed
|
||||
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
||||
showHUD true;
|
||||
};
|
||||
};
|
||||
};
|
26
addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf
Normal file
26
addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Loads a captive into a vehicle
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Captive <OBJECT>
|
||||
* 1: The Vehicle <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, car1] call ACE_captives_fnc_vehicleCaptiveMoveIn;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_target,_vehicle);
|
||||
|
||||
private ["_cargoIndex"];
|
||||
|
||||
_target moveInCargo _vehicle;
|
||||
_target assignAsCargo _vehicle;
|
||||
_cargoIndex = _vehicle getCargoIndex _target;
|
||||
_target setVariable [QGVAR(CargoIndex), _cargoIndex, true];
|
24
addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf
Normal file
24
addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Unloads a captive from a vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Captive Unit being unloaded <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ACE_captives_fnc_vehicleCaptiveMoveOut;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_unit setVariable [QGVAR(CargoIndex), -1, true];
|
||||
|
||||
moveOut _unit;
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
unassignVehicle _unit;
|
1
addons/captives/functions/script_component.hpp
Normal file
1
addons/captives/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\captives\script_component.hpp"
|
BIN
addons/captives/models/ace_cabletie.p3d
Normal file
BIN
addons/captives/models/ace_cabletie.p3d
Normal file
Binary file not shown.
79
addons/captives/models/ace_default.rvmat
Normal file
79
addons/captives/models/ace_default.rvmat
Normal file
@ -0,0 +1,79 @@
|
||||
ambient[]={1,1,1,1};
|
||||
diffuse[]={1,1,1,1};
|
||||
forcedDiffuse[]={0,0,0,0};
|
||||
emmisive[]={0,0,0,1};
|
||||
specular[]={0.01,0.01,0.01,1}; //amount of glossiness - the higher the number, the higher the glossiness
|
||||
specularPower=500; //area of glossiness - the higher the number, the smaller the area
|
||||
PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
|
||||
class Stage1 {
|
||||
texture="#(rgb,1,1,1)color(0.5,0.5,1,1)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage2 {
|
||||
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,dt)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage3 {
|
||||
texture="#(argb,8,8,3)color(0,0,0,0,mc)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage4 {
|
||||
texture="#(argb,8,8,3)color(1,1,1,1,as)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,1};
|
||||
};
|
||||
};
|
||||
class Stage5 {
|
||||
texture="#(rgb,1,1,1)color(0.2,0.2,1,1)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage6 {
|
||||
texture="#(ai,64,64,1)fresnel(4.7,1.2)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage7 {
|
||||
texture="a3\data_f\env_land_ca.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
12
addons/captives/script_component.hpp
Normal file
12
addons/captives/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT captives
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_CAPTIVES
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_CAPTIVES
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_CAPTIVES
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
BIN
addons/captives/sounds/cable_tie_zipping.ogg
Normal file
BIN
addons/captives/sounds/cable_tie_zipping.ogg
Normal file
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-16 -->
|
||||
<Project name="AGM">
|
||||
<!-- Edited with tabler - 2015-02-06 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Captives">
|
||||
<Key ID="STR_AGM_Captives_SetCaptive">
|
||||
<Key ID="STR_ACE_Captives_SetCaptive">
|
||||
<English>Take Prisoner</English>
|
||||
<German>Gefangen nehmen</German>
|
||||
<Spanish>Tomar prisionero</Spanish>
|
||||
@ -14,7 +14,7 @@
|
||||
<Hungarian>Foglyul ejtés</Hungarian>
|
||||
<Russian>Взять в плен</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_ReleaseCaptive">
|
||||
<Key ID="STR_ACE_Captives_ReleaseCaptive">
|
||||
<English>Free Prisoner</English>
|
||||
<German>Gefangenen freilassen</German>
|
||||
<Spanish>Liberar prisionero</Spanish>
|
||||
@ -26,7 +26,7 @@
|
||||
<Hungarian>Fogoly szabadon elengedése</Hungarian>
|
||||
<Russian>Освободить пленника</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_EscortCaptive">
|
||||
<Key ID="STR_ACE_Captives_EscortCaptive">
|
||||
<English>Escort Prisoner</English>
|
||||
<German>Gefangenen eskortieren</German>
|
||||
<Spanish>Escoltar prisionero</Spanish>
|
||||
@ -38,7 +38,7 @@
|
||||
<Hungarian>Fogoly kísérése</Hungarian>
|
||||
<Russian>Конвоировать пленника</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_StopEscorting">
|
||||
<Key ID="STR_ACE_Captives_StopEscorting">
|
||||
<English>Release Prisoner</English>
|
||||
<German>Gefangenen loslassen</German>
|
||||
<Spanish>Soltar prisionero</Spanish>
|
||||
@ -50,7 +50,7 @@
|
||||
<Hungarian>Fogoly elengedése</Hungarian>
|
||||
<Russian>Прекратить конвоирование</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_NoCaptive">
|
||||
<Key ID="STR_ACE_Captives_NoCaptive">
|
||||
<English>You need to take him as prisoner first!</English>
|
||||
<German>Du must ihn zuerst gefangen nehmen.</German>
|
||||
<Spanish>Necesitas hacerle prisionero primero!</Spanish>
|
||||
@ -62,7 +62,7 @@
|
||||
<Hungarian>Először foglyul kell ejtened!</Hungarian>
|
||||
<Russian>Вы должны сначала взять его в плен!</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_LoadCaptive">
|
||||
<Key ID="STR_ACE_Captives_LoadCaptive">
|
||||
<English>Load Captive</English>
|
||||
<German>Gefangenen einladen</German>
|
||||
<Spanish>Cargar prisionero</Spanish>
|
||||
@ -71,8 +71,9 @@
|
||||
<Czech>Naložit zajatce</Czech>
|
||||
<Hungarian>Fogoly berakása</Hungarian>
|
||||
<Russian>Загрузить пленного</Russian>
|
||||
<Portuguese>Embarcar Prisioneiro</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_UnloadCaptive">
|
||||
<Key ID="STR_ACE_Captives_UnloadCaptive">
|
||||
<English>Unload Captive</English>
|
||||
<German>Gefangenen ausladen</German>
|
||||
<Spanish>Descargar prisionero</Spanish>
|
||||
@ -81,8 +82,9 @@
|
||||
<Czech>Vyložit zajatce</Czech>
|
||||
<Hungarian>Fogoly kivevése</Hungarian>
|
||||
<Russian>Выгрузить пленного</Russian>
|
||||
<Portuguese>Desembarcar Prisioneiro</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_CableTie">
|
||||
<Key ID="STR_ACE_Captives_CableTie">
|
||||
<English>Cable Tie</English>
|
||||
<German>Kabelbinder</German>
|
||||
<Polish>Opaska zaciskowa</Polish>
|
||||
@ -94,7 +96,7 @@
|
||||
<Hungarian>Gyorskötöző</Hungarian>
|
||||
<Russian>Кабельная стяжка</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_CableTieDescription">
|
||||
<Key ID="STR_ACE_Captives_CableTieDescription">
|
||||
<English>Cable ties that allow you to restrain prisoners.</English>
|
||||
<German>Kabelbinder ermöglichen es, Gefangene zu fesseln.</German>
|
||||
<Polish>Opaska zaciskowa pozwala na skrępowanie dłoni u więźnia.</Polish>
|
||||
@ -106,7 +108,7 @@
|
||||
<Hungarian>Gyorskötöző emberek fogjulejtéséhez.</Hungarian>
|
||||
<Russian>Кабельные стяжки позволяют связывать пленников.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_FriskMenuHeader">
|
||||
<Key ID="STR_ACE_Captives_FriskMenuHeader">
|
||||
<English>Inventory of frisked person</English>
|
||||
<German>Inventar der durchsuchten Person</German>
|
||||
<French>Inventaire de la fouille</French>
|
||||
@ -115,8 +117,9 @@
|
||||
<Czech>Inventář prohledávané osoby</Czech>
|
||||
<Polish>Ekwipunek rewidowanej osoby</Polish>
|
||||
<Russian>Инвентарь обысканных лиц</Russian>
|
||||
<Portuguese>Inventário da pessoa revistada</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Captives_FriskPerson">
|
||||
<Key ID="STR_ACE_Captives_FriskPerson">
|
||||
<English>Frisk person</English>
|
||||
<German>Person durchsuchen</German>
|
||||
<French>Fouiller</French>
|
||||
@ -125,6 +128,13 @@
|
||||
<Polish>Rewiduj osobę</Polish>
|
||||
<Hungarian>Motozás</Hungarian>
|
||||
<Russian>Обыскать человека</Russian>
|
||||
<Portuguese>Revistar</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_StartSurrendering">
|
||||
<English>Surrender</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_StopSurrendering">
|
||||
<English>Stop Surrendering</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -2,7 +2,6 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
serverInit = QUOTE(call COMPILE_FILE(scripts\readParameters));
|
||||
disableModuload = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,25 @@
|
||||
// ACE - Common
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Load settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
};
|
||||
|
||||
// Listens for global "SettingChanged" events, to update the force status locally
|
||||
["SettingChanged", {
|
||||
|
||||
PARAMS_2(_name,_value);
|
||||
if !(count _this > 2) exitWith {};
|
||||
|
||||
_force = _this select 2;
|
||||
if (_force) then {
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
if (count _settingData == 0) exitWith {};
|
||||
_settingData set [6,_force];
|
||||
};
|
||||
}] call FUNC(addEventhandler);
|
||||
|
||||
// hack to get PFH to work in briefing
|
||||
[QGVAR(onBriefingPFH), "onEachFrame", {
|
||||
if (time > 0) exitWith {
|
||||
@ -63,7 +82,7 @@ enableCamShake true;
|
||||
|
||||
}] call FUNC(addEventhandler);
|
||||
|
||||
GVAR(OldPlayerInventory) = ACE_player call FUNC(getAllGear);
|
||||
GVAR(OldPlayerInventory) = [ACE_player] call FUNC(getAllGear);
|
||||
GVAR(OldPlayerVisionMode) = currentVisionMode ACE_player;
|
||||
GVAR(OldZeusDisplayIsOpen) = !(isNull findDisplay 312);
|
||||
GVAR(OldCameraView) = cameraView;
|
||||
@ -74,7 +93,7 @@ GVAR(OldPlayerTurret) = [ACE_player] call FUNC(getTurretIndex);
|
||||
[{
|
||||
|
||||
// "playerInventoryChanged" event
|
||||
_newPlayerInventory = ACE_player call FUNC(getAllGear);
|
||||
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
|
||||
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerInventory) = _newPlayerInventory;
|
||||
|
@ -11,6 +11,7 @@ PREP(addCustomEventHandler);
|
||||
PREP(addLineToDebugDraw);
|
||||
PREP(addMapMarkerCreatedEventHandler);
|
||||
PREP(addScrollWheelEventHandler);
|
||||
PREP(addSetting);
|
||||
PREP(adminKick);
|
||||
PREP(ambientBrightness);
|
||||
PREP(applyForceWalkStatus);
|
||||
@ -48,6 +49,7 @@ PREP(getConfigGunner);
|
||||
PREP(getDefaultAnim);
|
||||
PREP(getDoorTurrets);
|
||||
PREP(getForceWalkStatus);
|
||||
PREP(getGunner);
|
||||
PREP(getHitPoints);
|
||||
PREP(getHitPointsWithSelections);
|
||||
PREP(getInPosition);
|
||||
@ -55,6 +57,7 @@ PREP(getMarkerType);
|
||||
PREP(getName);
|
||||
PREP(getNumberFromMissionSQM);
|
||||
PREP(getPitchBankYaw);
|
||||
PREP(getSettingData);
|
||||
PREP(getStringFromMissionSQM);
|
||||
PREP(getTargetAzimuthAndInclination);
|
||||
PREP(getTargetDistance);
|
||||
@ -72,6 +75,7 @@ PREP(getVehicleCargo);
|
||||
PREP(getVehicleCodriver);
|
||||
PREP(getVehicleCrew);
|
||||
PREP(getWeaponAzimuthAndInclination);
|
||||
PREP(getWeaponIndex);
|
||||
PREP(getWeaponType);
|
||||
PREP(getWindDirection);
|
||||
PREP(goKneeling);
|
||||
@ -85,6 +89,8 @@ PREP(isInBuilding);
|
||||
PREP(isPlayer);
|
||||
PREP(isTurnedOut);
|
||||
PREP(letterToCode);
|
||||
PREP(loadSettingsFromProfile);
|
||||
PREP(loadSettingsOnServer);
|
||||
PREP(map);
|
||||
PREP(moduleCheckPBOs);
|
||||
PREP(moduleLSDVehicles);
|
||||
@ -97,8 +103,7 @@ PREP(player);
|
||||
PREP(playerSide);
|
||||
PREP(progressBar);
|
||||
PREP(queueAnimation);
|
||||
PREP(readBooleanParameterFromModule);
|
||||
PREP(readNumericParameterFromModule);
|
||||
PREP(readSettingFromModule);
|
||||
PREP(removeActionEventHandler);
|
||||
PREP(removeActionMenuEventHandler);
|
||||
PREP(removeCameraEventHandler);
|
||||
@ -115,12 +120,16 @@ PREP(setName);
|
||||
PREP(setParameter);
|
||||
PREP(setPitchBankYaw);
|
||||
PREP(setVariableJIP);
|
||||
PREP(setVariablePublic);
|
||||
PREP(setSetting);
|
||||
PREP(setSettingFromConfig);
|
||||
PREP(stringToColoredText);
|
||||
PREP(subString);
|
||||
PREP(toBin);
|
||||
PREP(toBitmask);
|
||||
PREP(toHex);
|
||||
PREP(toNumber);
|
||||
PREP(throttledPublicVariable);
|
||||
PREP(unmuteUnit);
|
||||
PREP(waitAndExecute);
|
||||
|
||||
@ -162,7 +171,10 @@ PREP(hashListSelect);
|
||||
PREP(hashListSet);
|
||||
PREP(hashListPush);
|
||||
|
||||
|
||||
// Load settings
|
||||
if (isServer) then {
|
||||
call FUNC(loadSettingsOnServer);
|
||||
};
|
||||
|
||||
ACE_player = player;
|
||||
|
||||
@ -183,7 +195,6 @@ if (hasInterface) then {
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
|
||||
PREP(stringCompare);
|
||||
PREP(string_removeWhiteSpace);
|
||||
PREP(isHC);
|
||||
|
@ -57,10 +57,42 @@ class ACE_canInteractConditions {
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Options {
|
||||
class ACE_Settings {
|
||||
/*
|
||||
*class GVAR(sampleSetting) {
|
||||
* Value
|
||||
* value = 1;
|
||||
*
|
||||
* Type (SCALAR, BOOL, STRING, ARRAY, COLOR)
|
||||
* typeName = "SCALAR";
|
||||
*
|
||||
* Force the setting?
|
||||
* force = 0;
|
||||
*
|
||||
* Does it appear on the options menu?
|
||||
* isClientSetable = 1;
|
||||
*
|
||||
* The following settings only apply when isClientSetable == 1
|
||||
* Stringtable entry with the setting name
|
||||
* displayName = "$STR_ACE_Common_SettingName";
|
||||
*
|
||||
* Stringtable entry with the setting description
|
||||
* description = "$STR_ACE_Common_SettingDescription";
|
||||
*
|
||||
* Stringtable entries that describe the options
|
||||
* Only applies if typeName == "SCALAR";
|
||||
* values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"};
|
||||
*};
|
||||
*/
|
||||
class GVAR(forceAllSettings) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(enableNumberHotkeys) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
|
||||
default = 1;
|
||||
};
|
||||
};
|
||||
|
||||
|
40
addons/common/functions/fnc_addSetting.sqf
Normal file
40
addons/common/functions/fnc_addSetting.sqf
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Adds a new setting at runtime, with all it's metadata.
|
||||
* If has only local effects.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _name (String)
|
||||
* 1: _typeName (String)
|
||||
* 2: _isClientSetable (Bool)
|
||||
* 3: _localizedName (String)
|
||||
* 4: _localizedDescription (String)
|
||||
* 5: _possibleValues (Array)
|
||||
* 6: _isForced (Bool)
|
||||
* 7: _defaultValue (Any)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_8_PVT(_this,_name,_typeName,_isClientSetable,_localizedName,_localizedDescription,_possibleValues,_isForced,_value);
|
||||
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
|
||||
// Exit if the setting already exists
|
||||
if (count _settingData > 0) exitWith {};
|
||||
|
||||
// Update the variable
|
||||
TRACE_2("Setting added",_name,_value);
|
||||
|
||||
// Init the variable
|
||||
missionNamespace setVariable [_name, _value];
|
||||
|
||||
// Add the setting data
|
||||
GVAR(settings) pushBack _this;
|
||||
|
||||
// Raise event locally
|
||||
["SettingChanged", [_name, _value]] call FUNC(localEvent);
|
@ -1,10 +1,22 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
* Fixes the lowered rifle animation
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [_player] call ace_common_fnc_fixLoweredRifleAnimation
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_unit";
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_unit = _this select 0;
|
||||
|
||||
if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"}) then {
|
||||
if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"} && {(vehicle _unit) == _unit}) then {
|
||||
[_unit, "amovpercmstpsraswrfldnon", 0] call FUNC(doAnimation);
|
||||
};
|
||||
|
28
addons/common/functions/fnc_getGunner.sqf
Normal file
28
addons/common/functions/fnc_getGunner.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Get the gunner of a vehicle who uses the given weapon type. Requires every turret to have a different weapon.
|
||||
*
|
||||
* Argument:
|
||||
* 0: The vehicle (Object)
|
||||
* 1: weapon of the vehicle (String)
|
||||
*
|
||||
* Return value:
|
||||
* The turret gunner with this weapon (Object)
|
||||
*/
|
||||
|
||||
private ["_vehicle", "_weapon"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
|
||||
private "_gunner";
|
||||
_gunner = objNull;
|
||||
|
||||
{
|
||||
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
||||
_gunner = _vehicle turretUnit _x;
|
||||
};
|
||||
} forEach allTurrets _vehicle;
|
||||
|
||||
_gunner
|
31
addons/common/functions/fnc_getSettingData.sqf
Normal file
31
addons/common/functions/fnc_getSettingData.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Returns the metadata of a setting if it exists
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name of the setting (String)
|
||||
*
|
||||
* Return Value:
|
||||
* Setting Data (Array)
|
||||
* 0: _name
|
||||
* 1: _typeName
|
||||
* 2: _isClientSetable
|
||||
* 3: _localizedName
|
||||
* 4: _localizedDescription
|
||||
* 5: _possibleValues
|
||||
* 6: _isForced
|
||||
* 7: _defaultValue
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_1_PVT(_this,_name);
|
||||
|
||||
private ["_value"];
|
||||
_value = [];
|
||||
{
|
||||
if ((_x select 0) == _name) exitWith {_value = _x};
|
||||
} forEach GVAR(settings);
|
||||
|
||||
_value
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user