diff --git a/cScripts/CfgFunctions.hpp b/cScripts/CfgFunctions.hpp
index e63297b46..64bbd4821 100644
--- a/cScripts/CfgFunctions.hpp
+++ b/cScripts/CfgFunctions.hpp
@@ -167,6 +167,7 @@ class cScripts {
class vehicle_getPylon {};
// Other
+ class vehicle_reset {};
class vehicle_addFlagAction {};
};
class modules {
diff --git a/cScripts/functions/mission/fn_addGetOutHelo.sqf b/cScripts/functions/mission/fn_addGetOutHelo.sqf
index f9a32dc84..ae9ae328c 100644
--- a/cScripts/functions/mission/fn_addGetOutHelo.sqf
+++ b/cScripts/functions/mission/fn_addGetOutHelo.sqf
@@ -29,18 +29,18 @@ if (_useColor) then {
_rightSide = "Get out Right Side";
};
-_vehicle addAction [
+private _actionIDL = _vehicle addAction [
_leftSide,
{[_this select 0, true] call FUNC(doGetOutHeloSide)},
0, 1.5, true, true, "User12",
"(_target getCargoIndex _this) != -1"
];
-_vehicle addAction [
+private _actionIDR = _vehicle addAction [
_rightSide,
{[_this select 0, false] call FUNC(doGetOutHeloSide)},
0, 1.5, true, true, "User13",
"(_target getCargoIndex _this) != -1"
];
-_vehicle setVariable [QEGVAR(Vehicle,doGetOutHeloSide),"true"];
+_vehicle setVariable [QEGVAR(Vehicle,GetOutRightLeft), [_vehicle, [_actionIDL, _actionIDR]], true];
diff --git a/cScripts/functions/mission/fn_addHaloJump.sqf b/cScripts/functions/mission/fn_addHaloJump.sqf
index 08cd84871..351d615d4 100644
--- a/cScripts/functions/mission/fn_addHaloJump.sqf
+++ b/cScripts/functions/mission/fn_addHaloJump.sqf
@@ -27,7 +27,7 @@ if (!isNil {_vehicle getVariable QEGVAR(Vehicle,Halo)}) exitWith {[format["Aircr
private _conditionHoldAction = format ["((_target getCargoIndex player) != -1) && ((_target animationPhase 'ramp_bottom' > 0.64) or (_target animationPhase 'door_2_1' == 1) or (_target animationPhase 'door_2_2' == 1) or (_target animationPhase 'jumpdoor_1' == 1) or (_target animationPhase 'jumpdoor_2' == 1) or (_target animationPhase 'back_ramp_switch' == 1) or (_target animationPhase 'back_ramp_half_switch' == 1) or (_target doorPhase 'RearDoors' > 0.5) or (_target doorPhase 'Door_1_source' > 0.5) or (_target animationSourcePhase 'ramp_anim' > 0.5)) && ((getPosVisual _target) select 2 >= %1)", _minAltetude];
// Add hold action for jump
-[
+private _actionID = [
_vehicle,
"HALO Jump",
"cScripts\Data\Icon\icon_02.paa",
@@ -48,4 +48,4 @@ private _conditionHoldAction = format ["((_target getCargoIndex player) != -1) &
false
] call BIS_fnc_holdActionAdd;
-_vehicle setVariable [QEGVAR(Vehicle,Halo), [_vehicle, _minAltetude, _chuteBackpackClass]];
+_vehicle setVariable [QEGVAR(Vehicle,Halo), [_vehicle, _actionID, _minAltetude, _chuteBackpackClass], true];
diff --git a/cScripts/functions/mission/fn_addLineJump.sqf b/cScripts/functions/mission/fn_addLineJump.sqf
index a58116d2c..11d0bb575 100644
--- a/cScripts/functions/mission/fn_addLineJump.sqf
+++ b/cScripts/functions/mission/fn_addLineJump.sqf
@@ -32,7 +32,7 @@ if (!isNil {_vehicle getVariable QEGVAR(Vehicle,Jump)}) exitWith {[format["Aircr
private _conditionHoldAction = format ["((_target getCargoIndex player) != -1) && ((_target animationPhase 'ramp_bottom' > 0.64) or (_target animationPhase 'door_2_1' == 1) or (_target animationPhase 'door_2_2' == 1) or (_target animationPhase 'jumpdoor_1' == 1) or (_target animationPhase 'jumpdoor_2' == 1) or (_target animationPhase 'back_ramp_switch' == 1) or (_target animationPhase 'back_ramp_half_switch' == 1) or (_target doorPhase 'RearDoors' > 0.5) or (_target doorPhase 'Door_1_source' > 0.5) or (_target animationSourcePhase 'ramp_anim' > 0.5)) && ((getPosVisual _target) select 2 >= %1) && ((getPosVisual _target) select 2 <= %2) && (speed _target <= %3)", _minAltetude, _maxAltetude, _maxSpeed];
// Add hold action for jump
-[
+private _actionID = [
_vehicle,
"Jump",
"cScripts\Data\Icon\icon_02.paa",
@@ -53,4 +53,4 @@ private _conditionHoldAction = format ["((_target getCargoIndex player) != -1) &
false
] call BIS_fnc_holdActionAdd;
-_vehicle setVariable [QEGVAR(Vehicle,Jump),[_vehicle, _minAltetude, _maxAltetude, _maxSpeed, _chuteVehicleClass]];
+_vehicle setVariable [QEGVAR(Vehicle,Jump), [_vehicle, _actionID, _minAltetude, _maxAltetude, _maxSpeed, _chuteVehicleClass], true];
diff --git a/cScripts/functions/vehicle/fn_vehicle_reset.sqf b/cScripts/functions/vehicle/fn_vehicle_reset.sqf
new file mode 100644
index 000000000..caf49a664
--- /dev/null
+++ b/cScripts/functions/vehicle/fn_vehicle_reset.sqf
@@ -0,0 +1,68 @@
+#include "..\script_component.hpp";
+/*
+ * Author: CPL.Brostrom.A
+ * This function clears all function variables as well as its attachments
+ *
+ * Arguments:
+ * 0: Vehicle