mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into slideshowFixes
Conflicts: addons/slideshow/functions/fnc_createSlideshow.sqf
This commit is contained in:
commit
12399db0ac
@ -341,6 +341,14 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
|
||||
GVAR(deviceKeyHandlingArray) = [];
|
||||
GVAR(deviceKeyCurrentIndex) = -1;
|
||||
|
||||
// Register localizations for the Keybinding categories
|
||||
["ACE3 Equipment", localize LSTRING(ACEKeybindCategoryEquipment)] call cba_fnc_registerKeybindModPrettyName;
|
||||
["ACE3 Common", localize LSTRING(ACEKeybindCategoryCommon)] call cba_fnc_registerKeybindModPrettyName;
|
||||
["ACE3 Weapons", localize LSTRING(ACEKeybindCategoryWeapons)] call cba_fnc_registerKeybindModPrettyName;
|
||||
["ACE3 Movement", localize LSTRING(ACEKeybindCategoryMovement)] call cba_fnc_registerKeybindModPrettyName;
|
||||
["ACE3 Scope Adjustment", localize LSTRING(ACEKeybindCategoryScopeAdjustment)] call cba_fnc_registerKeybindModPrettyName;
|
||||
["ACE3 Vehicles", localize LSTRING(ACEKeybindCategoryVehicles)] call cba_fnc_registerKeybindModPrettyName;
|
||||
|
||||
["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"),
|
||||
{
|
||||
[] call FUNC(deviceKeyFindValidIndex);
|
||||
|
@ -30,14 +30,14 @@ if (_vehicle isKindOf "Ship" ) then {
|
||||
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
|
||||
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
|
||||
} else {
|
||||
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
|
||||
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
|
||||
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]);
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
||||
if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid vehicle state. Either moving or Not close enough on the ground. %1", getPos _vehicle]; false };
|
||||
if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _vehicle]; false };
|
||||
|
||||
diag_log str _emptyPos;
|
||||
|
||||
|
@ -598,5 +598,29 @@
|
||||
<Polish>Następne urządzenie podręczne</Polish>
|
||||
<Czech>Procházet ruční zařízení</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_ACEKeybindCategoryEquipment">
|
||||
<English>ACE3 Equipment</English>
|
||||
<Polish>ACE3 Wyposażenie</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_ACEKeybindCategoryCommon">
|
||||
<English>ACE3 Common</English>
|
||||
<Polish>ACE3 Ogólne</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_ACEKeybindCategoryWeapons">
|
||||
<English>ACE3 Weapons</English>
|
||||
<Polish>ACE3 Broń</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_ACEKeybindCategoryMovement">
|
||||
<English>ACE3 Movement</English>
|
||||
<Polish>ACE3 Ruch</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_ACEKeybindCategoryScopeAdjustment">
|
||||
<English>ACE3 Scope Adjustment</English>
|
||||
<Polish>ACE3 Regulacja optyki</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_ACEKeybindCategoryVehicles">
|
||||
<English>ACE3 Vehicles</English>
|
||||
<Polish>ACE3 Pojazdy</Polish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -25,7 +25,7 @@ class ACE_Medical_Actions {
|
||||
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
|
||||
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
||||
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
||||
litter[] = { {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} };
|
||||
litter[] = { {"All", "_previousDamage > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} };
|
||||
};
|
||||
class Morphine: Bandage {
|
||||
displayName = CSTRING(Inject_Morphine);
|
||||
@ -121,7 +121,7 @@ class ACE_Medical_Actions {
|
||||
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
|
||||
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
||||
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
||||
litter[] = { {"All", "", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} };
|
||||
litter[] = { {"All", "_previousDamage > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} };
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
items[] = {"ACE_packingBandage"};
|
||||
|
@ -717,6 +717,9 @@ class CfgVehicles {
|
||||
destrType = "DestructNo";
|
||||
model = QUOTE(PATHTOF(data\littergeneric.p3d));
|
||||
};
|
||||
class ACE_MedicalLitter_clean: ACE_MedicalLitterBase {
|
||||
model = QUOTE(PATHTOF(data\littergeneric_clean.p3d));
|
||||
};
|
||||
class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase {
|
||||
model = QUOTE(PATHTOF(data\littergeneric_bandages1.p3d));
|
||||
};
|
||||
|
BIN
addons/medical/data/ace_litterclean_co.paa
Normal file
BIN
addons/medical/data/ace_litterclean_co.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/littergeneric_clean.p3d
Normal file
BIN
addons/medical/data/littergeneric_clean.p3d
Normal file
Binary file not shown.
@ -16,12 +16,13 @@
|
||||
|
||||
#define MIN_ENTRIES_LITTER_CONFIG 3
|
||||
|
||||
private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems"];
|
||||
private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems", "_previousDamage"];
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
_selectionName = _this select 2;
|
||||
_className = _this select 3;
|
||||
_usersOfItems = _this select 5;
|
||||
_previousDamage = _this select 6;
|
||||
|
||||
if !(GVAR(allowLitterCreation)) exitwith {};
|
||||
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
|
||||
@ -76,7 +77,7 @@ _createdLitter = [];
|
||||
_litterCondition = missionNamespace getvariable _litterCondition;
|
||||
if (typeName _litterCondition != "CODE") then {_litterCondition = {false}};
|
||||
};
|
||||
if !([_caller, _target, _selectionName, _className, _usersOfItems] call _litterCondition) exitwith {};
|
||||
if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {};
|
||||
|
||||
if (typeName _litterOptions == "ARRAY") then {
|
||||
// Loop through through the litter options and place the litter
|
||||
|
@ -62,8 +62,19 @@ if (isNil _callback) then {
|
||||
_callback = missionNamespace getvariable _callback;
|
||||
};
|
||||
|
||||
_args call _callback;
|
||||
//Get current damage before treatment (for litter)
|
||||
_previousDamage = switch (toLower _selectionName) do {
|
||||
case ("head"): {_target getHitPointDamage "HitHead"};
|
||||
case ("body"): {_target getHitPointDamage "HitBody"};
|
||||
case ("hand_l"): {_target getHitPointDamage "HitLeftArm"};
|
||||
case ("hand_r"): {_target getHitPointDamage "HitRightArm"};
|
||||
case ("leg_l"): {_target getHitPointDamage "HitLeftLeg"};
|
||||
case ("leg_r"): {_target getHitPointDamage "HitRightLeg"};
|
||||
default {damage _target};
|
||||
};
|
||||
|
||||
_args call _callback;
|
||||
_args pushBack _previousDamage;
|
||||
_args call FUNC(createLitter);
|
||||
|
||||
//If we're not already tracking vitals, start:
|
||||
|
105
addons/sitting/CfgMoves.hpp
Normal file
105
addons/sitting/CfgMoves.hpp
Normal file
@ -0,0 +1,105 @@
|
||||
// Enable visual head movement while free-looking
|
||||
#define MACRO_ANIMATION \
|
||||
head = "headDefault";
|
||||
|
||||
class CfgMovesBasic;
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class States {
|
||||
class HubSittingChairA_idle1;
|
||||
class GVAR(HubSittingChairA_idle1): HubSittingChairA_idle1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairA_idle2;
|
||||
class GVAR(HubSittingChairA_idle2): HubSittingChairA_idle2 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairA_idle3;
|
||||
class GVAR(HubSittingChairA_idle3): HubSittingChairA_idle3 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairA_move1;
|
||||
class GVAR(HubSittingChairA_move1): HubSittingChairA_move1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairB_idle1;
|
||||
class GVAR(HubSittingChairB_idle1): HubSittingChairB_idle1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairB_idle2;
|
||||
class GVAR(HubSittingChairB_idle2): HubSittingChairB_idle2 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairB_idle3;
|
||||
class GVAR(HubSittingChairB_idle3): HubSittingChairB_idle3 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairB_move1;
|
||||
class GVAR(HubSittingChairB_move1): HubSittingChairB_move1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairC_idle1;
|
||||
class GVAR(HubSittingChairC_idle1): HubSittingChairC_idle1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairC_idle2;
|
||||
class GVAR(HubSittingChairC_idle2): HubSittingChairC_idle2 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairC_idle3;
|
||||
class GVAR(HubSittingChairC_idle3): HubSittingChairC_idle3 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairC_move1;
|
||||
class GVAR(HubSittingChairC_move1): HubSittingChairC_move1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUA_idle1;
|
||||
class GVAR(HubSittingChairUA_idle1): HubSittingChairUA_idle1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUA_idle2;
|
||||
class GVAR(HubSittingChairUA_idle2): HubSittingChairUA_idle2 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUA_idle3;
|
||||
class GVAR(HubSittingChairUA_idle3): HubSittingChairUA_idle3 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUA_move1;
|
||||
class GVAR(HubSittingChairUA_move1): HubSittingChairUA_move1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUB_idle1;
|
||||
class GVAR(HubSittingChairUB_idle1): HubSittingChairUB_idle1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUB_idle2;
|
||||
class GVAR(HubSittingChairUB_idle2): HubSittingChairUB_idle2 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUB_idle3;
|
||||
class GVAR(HubSittingChairUB_idle3): HubSittingChairUB_idle3 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUB_move1;
|
||||
class GVAR(HubSittingChairUB_move1): HubSittingChairUB_move1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUC_idle1;
|
||||
class GVAR(HubSittingChairUC_idle1): HubSittingChairUC_idle1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUC_idle2;
|
||||
class GVAR(HubSittingChairUC_idle2): HubSittingChairUC_idle2 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUC_idle3;
|
||||
class GVAR(HubSittingChairUC_idle3): HubSittingChairUC_idle3 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
class HubSittingChairUC_move1;
|
||||
class GVAR(HubSittingChairUC_move1): HubSittingChairUC_move1 {
|
||||
MACRO_ANIMATION
|
||||
};
|
||||
};
|
||||
};
|
@ -39,7 +39,7 @@ class CfgVehicles {
|
||||
class ACE_MainActions { \
|
||||
displayName = ECSTRING(interaction,MainAction); \
|
||||
selection = ""; \
|
||||
distance = 1.25; \
|
||||
distance = 1.5; \
|
||||
condition = "true"; \
|
||||
class GVAR(Sit) { \
|
||||
displayName = CSTRING(Sit); \
|
||||
|
@ -12,6 +12,7 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMoves.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
@ -19,30 +19,30 @@ private ["_animations"];
|
||||
|
||||
// Animations Pool
|
||||
_animations = [
|
||||
"HubSittingChairUA_idle1",
|
||||
"HubSittingChairUA_idle2",
|
||||
"HubSittingChairUA_idle3",
|
||||
"HubSittingChairUA_move1",
|
||||
"HubSittingChairUB_idle1",
|
||||
"HubSittingChairUB_idle2",
|
||||
"HubSittingChairUB_idle3",
|
||||
"HubSittingChairUB_move1",
|
||||
"HubSittingChairUC_idle1",
|
||||
"HubSittingChairUC_idle2",
|
||||
"HubSittingChairUC_idle3",
|
||||
"HubSittingChairUC_move1",
|
||||
"HubSittingChairA_idle1",
|
||||
"HubSittingChairA_idle2",
|
||||
"HubSittingChairA_idle3",
|
||||
"HubSittingChairA_move1",
|
||||
"HubSittingChairB_idle1",
|
||||
"HubSittingChairB_idle2",
|
||||
"HubSittingChairB_idle3",
|
||||
"HubSittingChairB_move1",
|
||||
"HubSittingChairC_idle1",
|
||||
"HubSittingChairC_idle2",
|
||||
"HubSittingChairC_idle3",
|
||||
"HubSittingChairC_move1"
|
||||
QGVAR(HubSittingChairA_idle1),
|
||||
QGVAR(HubSittingChairA_idle2),
|
||||
QGVAR(HubSittingChairA_idle3),
|
||||
QGVAR(HubSittingChairA_move1),
|
||||
QGVAR(HubSittingChairB_idle1),
|
||||
QGVAR(HubSittingChairB_idle2),
|
||||
QGVAR(HubSittingChairB_idle3),
|
||||
QGVAR(HubSittingChairB_move1),
|
||||
QGVAR(HubSittingChairC_idle1),
|
||||
QGVAR(HubSittingChairC_idle2),
|
||||
QGVAR(HubSittingChairC_idle3),
|
||||
QGVAR(HubSittingChairC_move1),
|
||||
QGVAR(HubSittingChairUA_idle1),
|
||||
QGVAR(HubSittingChairUA_idle2),
|
||||
QGVAR(HubSittingChairUA_idle3),
|
||||
QGVAR(HubSittingChairUA_move1),
|
||||
QGVAR(HubSittingChairUB_idle1),
|
||||
QGVAR(HubSittingChairUB_idle2),
|
||||
QGVAR(HubSittingChairUB_idle3),
|
||||
QGVAR(HubSittingChairUB_move1),
|
||||
QGVAR(HubSittingChairUC_idle1),
|
||||
QGVAR(HubSittingChairUC_idle2),
|
||||
QGVAR(HubSittingChairUC_idle3),
|
||||
QGVAR(HubSittingChairUC_move1)
|
||||
];
|
||||
|
||||
// Select random animation
|
||||
|
@ -34,7 +34,8 @@ _sitPosition = getArray (_configFile >> QGVAR(sitPosition));
|
||||
_sitRotation = if (isNumber (_configFile >> QGVAR(sitRotation))) then {getNumber (_configFile >> QGVAR(sitRotation))} else {45}; // Apply default if config entry not present
|
||||
|
||||
// Get random animation and perform it (before moving player to ensure correct placement)
|
||||
[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation);
|
||||
[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); // Correctly places when using non-transitional animations
|
||||
[_player, "", 1] call EFUNC(common,doAnimation); // Correctly applies animation's config values (such as disallow throwing of grenades, intercept keybinds... etc).
|
||||
|
||||
// Set direction and position
|
||||
_player setDir _sitDirection;
|
||||
|
@ -10,19 +10,19 @@
|
||||
* 4: Current Slideshow <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
* List of actions <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [[object], ["image"], ["name"], controller, 1] call ace_slideshow_fnc_addSlideActions
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_5(_objects,_images,_names,_controller,_currentSlideshow);
|
||||
private "_actions";
|
||||
|
||||
params ["_objects", "_images", "_names", "_controller", "_currentSlideshow"];
|
||||
|
||||
private ["_actions"];
|
||||
_actions = [];
|
||||
{
|
||||
_actions pushBack
|
||||
@ -32,10 +32,10 @@ _actions = [];
|
||||
_names select _forEachIndex,
|
||||
"",
|
||||
{
|
||||
EXPLODE_2_PVT(_this select 2,_objects,_image);
|
||||
(_this select 2) params ["_objects", "_image"];
|
||||
{
|
||||
_x setObjectTextureGlobal [0, _image]
|
||||
} forEach _objects;
|
||||
} count _objects;
|
||||
},
|
||||
{true},
|
||||
{},
|
||||
|
@ -4,25 +4,23 @@
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Objects <ARRAY>
|
||||
* 1: Controller Objects <ARRAY>
|
||||
* 2: Image Paths <ARRAY>
|
||||
* 3: Action Names <ARRAY>
|
||||
* 4: Duration <NUMBER> (0 disables automatic transitions)
|
||||
* 1: Image Paths <ARRAY>
|
||||
* 2: State Variable Name <ARRAY>
|
||||
* 3: Duration <NUMBER> (0 disables automatic transitions)
|
||||
*
|
||||
* Return Value:
|
||||
* Parsed List <ARRAY>
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [objects, controllers, images, actionNames, duration] call ace_slideshow_fnc_autoTransition
|
||||
* [objects, images, "ace_slideshow_slideshow1", duration] call ace_slideshow_fnc_autoTransition
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_4(_objects,_images,_varString,_duration);
|
||||
private "_currentSlide";
|
||||
|
||||
private ["_currentSlide"];
|
||||
params ["_objects", "_images", "_varString", "_duration"];
|
||||
|
||||
// Get current slide number of this slideshow
|
||||
_currentSlide = missionNamespace getVariable [_varString, 0];
|
||||
@ -36,10 +34,8 @@ missionNamespace setVariable [_varString, _currentSlide];
|
||||
// Set slide
|
||||
{
|
||||
_x setObjectTextureGlobal [0, _images select _currentSlide];
|
||||
} forEach _objects;
|
||||
} count _objects;
|
||||
|
||||
// Log current slide and execute Next slide
|
||||
TRACE_4("Auto-transition",_images select _currentSlide,_currentSlide,count _images,_duration);
|
||||
|
||||
|
||||
// Next slide
|
||||
[FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute);
|
||||
|
@ -17,10 +17,11 @@
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_5(_objects,_controllers,_images,_names,_duration);
|
||||
private ["_currentSlideshow", "_actionsObject", "_actionsClass", "_mainAction", "_slidesAction", "_varString"];
|
||||
|
||||
params ["_objects", "_controllers", "_images", "_names", "_duration"];
|
||||
|
||||
// Verify data
|
||||
if (count _images != count _names || {count _images == 0} || {count _names == 0}) exitWith {
|
||||
@ -30,7 +31,8 @@ if (count _images != count _names || {count _images == 0} || {count _names == 0}
|
||||
// Objects synced to the module
|
||||
{
|
||||
_objects pushBack _x;
|
||||
} forEach (synchronizedObjects _logic);
|
||||
nil
|
||||
} count (synchronizedObjects _logic);
|
||||
|
||||
// If no controllers use objects as controllers
|
||||
if (count _controllers == 0) then {
|
||||
@ -39,17 +41,16 @@ if (count _controllers == 0) then {
|
||||
|
||||
TRACE_4("Information",_objects,_controllers,_images,_names);
|
||||
|
||||
// Default images on whiteboards (first image)
|
||||
if (isServer) then {
|
||||
// Default images on whiteboards (first image)
|
||||
{
|
||||
_x setObjectTextureGlobal [0, _images select 0];
|
||||
} forEach _objects;
|
||||
} count _objects;
|
||||
|
||||
// Number of slideshows (multiple modules support)
|
||||
GVAR(slideshows) = GVAR(slideshows) + 1;
|
||||
};
|
||||
|
||||
private ["_currentSlideshow"];
|
||||
_currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets changed during execution of below code
|
||||
|
||||
// If interaction menu module is not present, set default duration value
|
||||
@ -60,7 +61,6 @@ if !(["ace_interact_menu"] call EFUNC(common,isModLoaded)) then {
|
||||
|
||||
// Add interactions if automatic transitions are disabled, else setup automatic transitions
|
||||
if (_duration == 0) then {
|
||||
private ["_actionsObject", "_actionsClass", "_mainAction", "_slidesAction"];
|
||||
{
|
||||
// Add MainAction if one does not already exist
|
||||
_actionsObject = _x getVariable [QEGVAR(interact_menu,actions), []];
|
||||
@ -74,12 +74,12 @@ if (_duration == 0) then {
|
||||
// Add Slides sub-action and populate with images
|
||||
_slidesAction = [QGVAR(Slides), localize LSTRING(Interaction), "", {}, {true}, {(_this select 2) call FUNC(addSlideActions)}, [_objects,_images,_names,_x,_currentSlideshow], [0,0,0], 2] call EFUNC(interact_menu,createAction);
|
||||
[_x, 0, ["ACE_MainActions"], _slidesAction] call EFUNC(interact_menu,addActionToObject);
|
||||
} forEach _controllers;
|
||||
nil
|
||||
} count _controllers;
|
||||
} else {
|
||||
if !(isServer) exitWith {};
|
||||
|
||||
// Formatted GVAR string (multiple modules support)
|
||||
private ["_varString"];
|
||||
_varString = format [QGVAR(slideshow%1), _currentSlideshow];
|
||||
TRACE_1("Current Slide",_varString);
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_list,_removeWhitespace,_checkNil);
|
||||
params ["_list", "_removeWhitespace", "_checkNil"];
|
||||
|
||||
private ["_splittedList", "_listNoWhitespace", "_nilCheckPassedList"];
|
||||
|
||||
@ -30,7 +30,8 @@ _listNoWhitespace = [];
|
||||
if (_removeWhitespace) then {
|
||||
{
|
||||
_listNoWhitespace pushBack ([_x] call EFUNC(common,stringRemoveWhiteSpace));
|
||||
} forEach _splittedList;
|
||||
nil
|
||||
} count _splittedList;
|
||||
_list = _listNoWhitespace;
|
||||
};
|
||||
|
||||
@ -45,7 +46,7 @@ if (_checkNil) then {
|
||||
_nilCheckPassedList = _nilCheckPassedList + "," + _x;
|
||||
};
|
||||
};
|
||||
} forEach _list;
|
||||
} count _list;
|
||||
|
||||
// Add Array characters and parse into array
|
||||
_list = "[" + _nilCheckPassedList + "]";
|
||||
@ -54,4 +55,4 @@ if (_checkNil) then {
|
||||
|
||||
TRACE_4("Lists",_splittedList,_listNoWhitespace,_nilCheckPassedList,_list);
|
||||
|
||||
_list
|
||||
_list // return
|
||||
|
@ -12,19 +12,16 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Exit on Headless Client
|
||||
if (!hasInterface && !isDedicated) exitWith {};
|
||||
|
||||
PARAMS_3(_logic,_units,_activated);
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
private ["_objects", "_controllers", "_images", "_names", "_duration"];
|
||||
|
||||
_logic = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
|
||||
params [["_logic", objNull, [objNull]], "_units", "_activated"];
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
if (isNull _logic) exitWith {};
|
||||
|
||||
// Extract variables from logic
|
||||
|
@ -1,30 +1,30 @@
|
||||
/*
|
||||
* Author: Rocko, Ruthberg
|
||||
*
|
||||
* Pick up spotting scope
|
||||
*
|
||||
* Arguments:
|
||||
* 0: spotting scope <OBJECT>
|
||||
* 1: unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [spotting_scope, player] call ace_spottingscope_fnc_pickup
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_spottingScope,_unit);
|
||||
params ["_spottingScope", "_unit"];
|
||||
|
||||
if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
|
||||
_unit playMove "AmovPercMstpSrasWrflDnon_diary";
|
||||
};
|
||||
|
||||
[{
|
||||
PARAMS_2(_spottingScope,_unit);
|
||||
|
||||
params ["_spottingScope", "_unit"];
|
||||
|
||||
[_unit, "ACE_SpottingScope"] call EFUNC(common,addToInventory);
|
||||
deleteVehicle _spottingScope;
|
||||
|
||||
}, [_spottingScope, _unit], 1, 0]call EFUNC(common,waitAndExecute);
|
||||
|
@ -1,21 +1,22 @@
|
||||
/*
|
||||
* Author: Rocko, Ruthberg
|
||||
*
|
||||
* Place down spotting scope
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit <OBJECT>
|
||||
* 1: scope class <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, "ACE_SpottingScope"] call ace_spottingscope_fnc_place
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_scopeClass);
|
||||
params ["_unit", "_scopeClass"];
|
||||
|
||||
_unit removeItem _scopeClass;
|
||||
|
||||
@ -24,18 +25,17 @@ if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
|
||||
};
|
||||
|
||||
[{
|
||||
PARAMS_1(_unit);
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private ["_direction", "_position", "_spottingScope"];
|
||||
_direction = getDir _unit;
|
||||
_position = (getPosASL _unit) vectorAdd [0.8 * sin(_direction), 0.8 * cos(_direction), 0.02];
|
||||
|
||||
|
||||
_spottingScope = "ACE_SpottingScopeObject" createVehicle [0, 0, 0];
|
||||
_spottingScope setDir _direction;
|
||||
_spottingScope setPosASL _position;
|
||||
if ((getPosATL _spottingScope select 2) - (getPos _spottingScope select 2) < 1E-5) then {
|
||||
_spottingScope setVectorUp (surfaceNormal (position _spottingScope));
|
||||
_spottingScope setVectorUp (surfaceNormal (position _spottingScope));
|
||||
};
|
||||
_unit reveal _spottingScope;
|
||||
|
||||
}, [_unit], 1, 0] call EFUNC(common,waitAndExecute);
|
||||
|
@ -9,7 +9,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy;
|
||||
* [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -17,16 +17,16 @@
|
||||
|
||||
#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"]
|
||||
|
||||
PARAMS_1(_ladder);
|
||||
params ["_ladder"];
|
||||
|
||||
detach _ladder;
|
||||
_ladder animate ["rotate", 0];
|
||||
{
|
||||
_ladder animate [_x, 0];
|
||||
} forEach __ANIMS;
|
||||
} count __ANIMS;
|
||||
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
|
||||
GVAR(ladder) = objNull;
|
||||
|
@ -6,16 +6,16 @@
|
||||
* 0: ladder <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Success?
|
||||
* Success <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy;
|
||||
* [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_ladder);
|
||||
params ["_ladder"];
|
||||
|
||||
private ["_pos1", "_pos2"];
|
||||
_pos1 = getPosASL GVAR(ladder);
|
||||
@ -23,8 +23,8 @@ _pos2 = (GVAR(ladder) modelToWorld (GVAR(ladder) selectionPosition "check2")) ca
|
||||
if (lineIntersects [_pos1, _pos2, GVAR(ladder)]) exitWith { false };
|
||||
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
|
||||
detach _ladder;
|
||||
GVAR(ladder) = objNull;
|
||||
|
@ -3,13 +3,13 @@
|
||||
* Deploy tactical ladder
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_tacticalladder_fnc_deployTL;
|
||||
* [] call ace_tacticalladder_fnc_deployTL
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
@ -9,13 +9,13 @@
|
||||
* Handled <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* 1 call ace_tacticalladder_fnc_handleScrollWheel;
|
||||
* [1] call ace_tacticalladder_fnc_handleScrollWheel;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_scroll);
|
||||
params ["_scroll"];
|
||||
|
||||
if (isNull GVAR(ladder)) exitWith { false };
|
||||
|
||||
@ -37,7 +37,7 @@ if (GETMVAR(ACE_Modifier,0) == 0) then {
|
||||
if (GVAR(ladder) animationPhase (format["extract_%1", _currentStep]) == 1) then {
|
||||
GVAR(ladder) animate [format["extract_%1", _currentStep], 0];
|
||||
GVAR(currentStep) = _currentStep - 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Tilting
|
||||
@ -45,4 +45,4 @@ if (GETMVAR(ACE_Modifier,0) == 0) then {
|
||||
GVAR(ladder) animate ["rotate", GVAR(currentAngle)];
|
||||
};
|
||||
|
||||
true
|
||||
true
|
||||
|
@ -7,10 +7,10 @@
|
||||
* 1: unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Success?
|
||||
* Success <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL;
|
||||
* [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
if ((backpack ACE_player) != "") exitWith { false };
|
||||
|
||||
PARAMS_2(_ladder,_unit);
|
||||
params ["_ladder", "_unit"];
|
||||
|
||||
deleteVehicle _ladder;
|
||||
_unit addBackpack "ACE_TacticalLadder_Pack";
|
||||
|
@ -10,7 +10,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [_ladder, _unit] call ace_tacticalladder_fnc_positionTL;
|
||||
* [_ladder, _unit] call ace_tacticalladder_fnc_positionTL
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -18,11 +18,11 @@
|
||||
|
||||
#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"]
|
||||
|
||||
PARAMS_2(_ladder,_unit);
|
||||
params ["_ladder", "_unit"];
|
||||
|
||||
{
|
||||
_ladder animate [_x, 0];
|
||||
} forEach __ANIMS;
|
||||
} count __ANIMS;
|
||||
|
||||
_unit switchMove "amovpercmstpslowwrfldnon_player_idlesteady03";
|
||||
_ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of player
|
||||
@ -30,7 +30,7 @@ _ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of playe
|
||||
_ladder animate ["rotate", 0];
|
||||
{
|
||||
_ladder animate [_x, 1];
|
||||
} forEach ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3)
|
||||
} count ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3)
|
||||
|
||||
GVAR(ladder) = _ladder;
|
||||
GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling
|
||||
|
@ -1,37 +1,39 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Adjust tripod height
|
||||
*
|
||||
* Arguments:
|
||||
* 0: tripod <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [tripod] call ace_tripod_fnc_adjust
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_tripod);
|
||||
params ["_tripod"];
|
||||
|
||||
GVAR(adjuster) = ACE_player;
|
||||
GVAR(adjusting) = true;
|
||||
|
||||
GVAR(adjustPFH) = [{
|
||||
EXPLODE_1_PVT(_this select 0,_tripod);
|
||||
|
||||
params ["_args", "_pfhId"];
|
||||
_args params ["_tripod"];
|
||||
|
||||
if (GVAR(adjuster) != ACE_player || !GVAR(adjusting)) exitWith {
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Adjust), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
[_pfhId] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
||||
{
|
||||
_tripod animate [_x, 1 - GVAR(height)];
|
||||
} foreach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"];
|
||||
|
||||
} count ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"];
|
||||
|
||||
}, 0, [_tripod]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
[localize "STR_ACE_Tripod_Done", "", localize "STR_ACE_Tripod_ScrollAction"] call EFUNC(interaction,showMouseHint);
|
||||
|
@ -9,13 +9,13 @@
|
||||
* handled <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* 1.2 call ace_tripod_fnc_handleScrollWheel;
|
||||
* [1.2] call ace_tripod_fnc_handleScrollWheel;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_scroll);
|
||||
params ["_scroll"];
|
||||
|
||||
if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(adjustPFH) == -1) exitWith { false };
|
||||
|
||||
|
@ -1,30 +1,30 @@
|
||||
/*
|
||||
* Author: Rocko, Ruthberg
|
||||
*
|
||||
* Pick up tripod
|
||||
*
|
||||
* Arguments:
|
||||
* 0: tripod <OBJECT>
|
||||
* 1: unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [tripod, player] call ace_tripod_fnc_pickup
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_tripod,_unit);
|
||||
params ["_tripod", "_unit"];
|
||||
|
||||
if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
|
||||
_unit playMove "AmovPercMstpSrasWrflDnon_diary";
|
||||
};
|
||||
|
||||
[{
|
||||
PARAMS_2(_tripod,_unit);
|
||||
params ["_tripod", "_unit"];
|
||||
|
||||
[_unit, "ACE_Tripod"] call EFUNC(common,addToInventory);
|
||||
deleteVehicle _tripod;
|
||||
|
||||
}, [_tripod, _unit], 1, 0]call EFUNC(common,waitAndExecute);
|
||||
|
@ -1,21 +1,22 @@
|
||||
/*
|
||||
* Author: Rocko, Ruthberg
|
||||
*
|
||||
* Place down tripod
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit <OBJECT>
|
||||
* 1: tripod class <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, "ACE_Tripod"] call ace_tripod_fnc_place
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_tripodClass);
|
||||
params ["_unit", "_tripodClass"];
|
||||
|
||||
_unit removeItem _tripodClass;
|
||||
|
||||
@ -24,27 +25,29 @@ if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
|
||||
};
|
||||
|
||||
[{
|
||||
PARAMS_1(_unit);
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private ["_direction", "_position", "_tripod"];
|
||||
_direction = getDir _unit;
|
||||
_position = (getPosASL _unit) vectorAdd [0.8 * sin(_direction), 0.8 * cos(_direction), 0.02];
|
||||
|
||||
|
||||
_tripod = "ACE_TripodObject" createVehicle [0, 0, 0];
|
||||
{
|
||||
_tripod animate [_x, 1];
|
||||
} foreach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"];
|
||||
|
||||
} count ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"];
|
||||
|
||||
[{
|
||||
EXPLODE_3_PVT(_this select 0,_tripod,_direction,_position);
|
||||
params ["_args", "_pfhId"];
|
||||
_args params ["_tripod", "_direction", "_position"];
|
||||
|
||||
if (_tripod animationPhase "slide_down_tripod" == 1) then {
|
||||
_tripod setDir _direction;
|
||||
_tripod setPosASL _position;
|
||||
if ((getPosATL _tripod select 2) - (getPos _tripod select 2) < 1E-5) then {
|
||||
_tripod setVectorUp (surfaceNormal (position _tripod));
|
||||
_tripod setVectorUp (surfaceNormal (position _tripod));
|
||||
};
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
[_pfhId] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
}, 0, [_tripod, _direction, _position]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
}, [_unit], 1, 0] call EFUNC(common,waitAndExecute);
|
||||
|
@ -20,7 +20,10 @@
|
||||
|
||||
private ["_previousMags","_newMags","_keyMagazine","_keyName"];
|
||||
|
||||
PARAMS_3(_unit,_veh,_useCustom);
|
||||
if (!params [["_unit", objNull, [objNull]], ["_veh", objNull, [objNull]], ["_useCustom", false, [false]]]) exitWith {
|
||||
ERROR("Input wrong type");
|
||||
};
|
||||
TRACE_3("params",_unit,_veh,_useCustom);
|
||||
|
||||
if (isNull _unit) exitWith {ERROR("null unit");};
|
||||
if (isNull _veh) exitWith {ERROR("null vehicle");};
|
||||
|
@ -17,7 +17,8 @@
|
||||
|
||||
private ["_vehConfigSide","_vehSide","_returnValue"];
|
||||
|
||||
PARAMS_1(_veh);
|
||||
params ["_veh"];
|
||||
TRACE_1("params",_veh);
|
||||
|
||||
if (isNull _veh) exitWith {ERROR("null vehicle"); "error"};
|
||||
|
||||
|
@ -16,26 +16,30 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_vehicle"];
|
||||
TRACE_1("params",_vehicle);
|
||||
|
||||
[{
|
||||
//If the module wasn't placed, just exit (needs to be in wait because objectInitEH is before moduleInit)
|
||||
if (GVAR(VehicleStartingLockState) == -1) exitWith {};
|
||||
|
||||
private ["_lock"];
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
if ((_vehicle isKindOf "Car") || {_vehicle isKindOf "Tank"} || {_vehicle isKindOf "Helicopter"}) then {
|
||||
//set lock state (eliminates the ambigious 1-"Default" and 3-"Locked for Player" states)
|
||||
_lock = switch (GVAR(VehicleStartingLockState)) do {
|
||||
case (0): {(locked _vehicle) in [2, 3]};
|
||||
case (1):{true};
|
||||
case (2):{false};
|
||||
case (0): { (locked _vehicle) in [2, 3] };
|
||||
case (1): { true };
|
||||
case (2): { false };
|
||||
};
|
||||
if (((_lock) && {(locked _vehicle) != 2}) || {(!_lock) && {(locked _vehicle) != 0}}) then {
|
||||
if ((_lock && {(locked _vehicle) != 2}) || {!_lock && {(locked _vehicle) != 0}}) then {
|
||||
TRACE_3("Setting Lock State",_lock,(typeOf _vehicle),_vehicle);
|
||||
["VehicleLock_SetVehicleLock", [_vehicle], [_vehicle, _lock]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
};
|
||||
//Delay call until mission start (so everyone has the eventHandler's installed)
|
||||
}, [_vehicle], 0.25, 0.25] call EFUNC(common,waitAndExecute);
|
||||
}, [_vehicle], 0.25] call EFUNC(common,waitAndExecute);
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
private ["_returnValue","_sideKeyName","_customKeys"];
|
||||
|
||||
PARAMS_2(_unit,_veh);
|
||||
params ["_unit", "_veh"];
|
||||
TRACE_2("params",_unit,_veh);
|
||||
|
||||
if (isNull _unit) exitWith {ERROR("null unit"); false};
|
||||
if (isNull _veh) exitWith {ERROR("null vehicle"); false};
|
||||
|
@ -22,7 +22,8 @@
|
||||
|
||||
private ["_vehLockpickStrenth","_condition","_returnValue"];
|
||||
|
||||
PARAMS_3(_unit,_veh,_funcType);
|
||||
params ["_unit", "_veh", "_funcType"];
|
||||
TRACE_3("params",_unit,_veh,_funcType);
|
||||
|
||||
if (isNull _unit) exitWith {ERROR("null unit"); false};
|
||||
if (isNull _veh) exitWith {ERROR("null vehicle"); false};
|
||||
@ -41,25 +42,20 @@ if (_vehLockpickStrenth < 0) exitWith {false};
|
||||
|
||||
//Condition check for progressBar
|
||||
_condition = {
|
||||
PARAMS_1(_args);
|
||||
EXPLODE_2_PVT(_args,_unit,_veh);
|
||||
params ["_args"];
|
||||
_args params ["_args", "_unit", "_veh"];
|
||||
((_unit distance _veh) < 5) && {(speed _veh) < 0.1}
|
||||
};
|
||||
|
||||
if (!([[_unit, _veh]] call _condition)) exitWith {false};
|
||||
|
||||
_returnValue = false;
|
||||
switch (true) do {
|
||||
case (_funcType == "canLockpick"): {
|
||||
_returnValue = true;
|
||||
};
|
||||
case (_funcType == "startLockpick"): {
|
||||
_returnValue = _funcType in ["canLockpick", "startLockpick", "finishLockpick"];
|
||||
switch (_funcType) do {
|
||||
case "startLockpick": {
|
||||
[_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition] call EFUNC(common,progressBar);
|
||||
_returnValue = true;
|
||||
};
|
||||
case (_funcType == "finishLockpick"): {
|
||||
case "finishLockpick": {
|
||||
["VehicleLock_SetVehicleLock", [_veh], [_veh, false]] call EFUNC(common,targetEvent);
|
||||
_returnValue = true;
|
||||
};
|
||||
default {
|
||||
ERROR("bad function type");
|
||||
|
@ -17,10 +17,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_logic,_syncedUnits,_activated);
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_logic", "_syncedUnits", "_activated"];
|
||||
TRACE_3("params",_logic,_syncedObjects,_activated);
|
||||
|
||||
if (!_activated) exitWith {WARNING("Vehicle Lock Init Module - placed but not active");};
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
//Set the GVAR for default lockpick strength
|
||||
[_logic, QGVAR(DefaultLockpickStrength), "DefaultLockpickStrength"] call EFUNC(common,readSettingFromModule);
|
||||
|
@ -17,14 +17,18 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_logic,_syncedObjects,_activated);
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_logic", "_syncedObjects", "_activated"];
|
||||
TRACE_3("params",_logic,_syncedObjects,_activated);
|
||||
|
||||
if !(_activated) exitWith {WARNING("Vehicle Lock Sync Module - placed but not active");};
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
[{
|
||||
private ["_listOfVehicles"];
|
||||
PARAMS_1(_syncedObjects);
|
||||
|
||||
params ["_syncedObjects"];
|
||||
|
||||
_listOfVehicles = [];
|
||||
{
|
||||
if ((_x isKindOf "Car") || (_x isKindOf "Tank") || (_x isKindOf "Helicopter")) then {
|
||||
|
@ -16,7 +16,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_container);
|
||||
params ["_unit", "_container"];
|
||||
TRACE_2("params",_unit,_container);
|
||||
|
||||
//Only check for player:
|
||||
if (_unit != ace_player) exitWith {false};
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
private ["_currentKeys"];
|
||||
|
||||
PARAMS_2(_veh,_key);
|
||||
params ["_veh", "_key"];
|
||||
TRACE_2("params",_veh,_key);
|
||||
|
||||
if (!isServer) exitWith {ERROR("only run on server");};
|
||||
if (isNull _veh) exitWith {ERROR("null vehicle");};
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
private ["_lockNumber"];
|
||||
|
||||
PARAMS_2(_veh,_isLocked);
|
||||
params ["_veh", "_isLocked"];
|
||||
TRACE_2("params",_veh,_isLocked);
|
||||
|
||||
_lockNumber = if (_isLocked) then {2} else {0};
|
||||
TRACE_2("Setting Lock State", _veh, _lockNumber);
|
||||
|
@ -3,6 +3,7 @@ layout: wiki
|
||||
title: Finger
|
||||
description: Finger pointing
|
||||
group: feature
|
||||
category: realism
|
||||
parent: wiki
|
||||
---
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
layout: wiki
|
||||
title: Interaction
|
||||
description:
|
||||
category: Interaction
|
||||
group: feature
|
||||
category: interaction
|
||||
parent: wiki
|
||||
---
|
||||
|
||||
|
@ -3,6 +3,7 @@ layout: wiki
|
||||
title: Parachute
|
||||
description: Add an altimeter and a non-steerable parachute
|
||||
group: feature
|
||||
category: equipment
|
||||
parent: wiki
|
||||
---
|
||||
|
||||
|
@ -3,6 +3,7 @@ layout: wiki
|
||||
title: Sitting
|
||||
description:
|
||||
group: feature
|
||||
category: interaction
|
||||
parent: wiki
|
||||
---
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
layout: wiki
|
||||
title: Slideshow
|
||||
group: feature
|
||||
category: interaction
|
||||
parent: wiki
|
||||
---
|
||||
|
||||
@ -10,7 +11,7 @@ This adds the ability to have images shown on some objects and have other object
|
||||
Please note that only objects with hiddenSelection 0 can be used to render images (whiteboard, TV, PC Screen being the most notable examples).
|
||||
|
||||
## 2. Usage
|
||||
Note that this sections is for users, for mission makers refer to [the entry in mission-tools](./missionmaker/mission-tools.html)
|
||||
Note that this sections is for users, for mission makers refer to [the entry in mission-tools](../missionmaker/mission-tools.html)
|
||||
Also if no remotes are defined the "screen" object itself becomes the remote.
|
||||
|
||||
### 2.1 Switching between images
|
||||
|
@ -15,13 +15,14 @@ parent: wiki
|
||||
They can be found in the editor under: "Empty" >> "ACE Respawn"
|
||||
|
||||
**Classnames:**
|
||||
* `ACE_Rallypoint_West`, `ACE_Rallypoint_West_Base`
|
||||
* `ACE_Rallypoint_East`, `ACE_Rallypoint_East_Base`
|
||||
* `ACE_Rallypoint_Independent`, `ACE_Rallypoint_Independent_Base`
|
||||
- `ACE_Rallypoint_West`, `ACE_Rallypoint_West_Base`
|
||||
- `ACE_Rallypoint_East`, `ACE_Rallypoint_East_Base`
|
||||
- `ACE_Rallypoint_Independent`, `ACE_Rallypoint_Independent_Base`
|
||||
|
||||
Using the Interaction Menu on a rallypoint offers the ability to teleport from one flagpole to the other flagpole and vice versa.
|
||||
|
||||
If you want to change the texture of the flag use this line:
|
||||
|
||||
```c++
|
||||
this setFlagTexture 'path\to\my\texture\my_awesome_clan_logo.paa';
|
||||
```
|
||||
@ -32,7 +33,7 @@ All units synced to the ["Rallypoint System" module](./modules.html#1.14-rallypo
|
||||
|
||||
<div class="panel callout">
|
||||
<h5>Note:</h5>
|
||||
<p>It's important to mention that this doesn't work for player who join during a mission (JIP = Join in progress). That's something we can't change because that's the way Bohemia has implemented their module framework.</p>
|
||||
<p>It's important to mention that this doesn't work for player who join during a mission (JIP = Join in progress). That's something we can't change because that's the way Bohemia Interactive has implemented their module framework.</p>
|
||||
</div>
|
||||
|
||||
To enable other units to move them add this to the unit's initialization code:
|
||||
|
Loading…
Reference in New Issue
Block a user