still testing
This commit is contained in:
50
framework/emp/functions/fn_applyLocalObjectEffects.sqf
Normal file
50
framework/emp/functions/fn_applyLocalObjectEffects.sqf
Normal file
@@ -0,0 +1,50 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
// Executed on all clients, only continue if object is local.
|
||||
// Local argument, global effect (the object owner broadcasts new state)
|
||||
|
||||
params [["_object", objNull, [objNull]]];
|
||||
if (isNull _object) exitWith {};
|
||||
if !(local _object) exitWith {};
|
||||
|
||||
_object disableAI "LIGHTS";
|
||||
_object setPilotLight false;
|
||||
_object setCollisionLight false;
|
||||
|
||||
//for player units
|
||||
if (isPlayer _object) then {
|
||||
_object action ["IRLaserOff", _object];
|
||||
_object action ["nvGogglesOff", _object];
|
||||
};
|
||||
|
||||
private _primaryFlashlightOrPointer = (primaryWeaponItems _object)#1;
|
||||
if (_primaryFlashlightOrPointer != "") then {
|
||||
_object removePrimaryWeaponItem _primaryFlashlightOrPointer;
|
||||
_object removeItem _primaryFlashlightOrPointer;
|
||||
};
|
||||
private _secondaryFlashlightOrPointer = (secondaryWeaponItems _object)#1;
|
||||
if (_secondaryFlashlightOrPointer != "") then {
|
||||
_object removeSecondaryWeaponItem _secondaryFlashlightOrPointer;
|
||||
_object removeItem _secondaryFlashlightOrPointer;
|
||||
};
|
||||
|
||||
_nvgs = hmd _object;
|
||||
_object unassignItem _nvgs;
|
||||
_object removeItem _nvgs;
|
||||
_radio = _object getSlotItemName 611;
|
||||
_gps = _object getSlotItemName 612;
|
||||
_object unassignItem _radio;
|
||||
_object removeItem _radio;
|
||||
_object unassignItem _gps;
|
||||
_object removeItem _gps;
|
||||
_object unassignItem "ACE_microDAGR";
|
||||
_object removeItem "ACE_microDAGR";
|
||||
_object unassignItem "MineDetector";
|
||||
_object removeItem "MineDetector";
|
||||
|
||||
[{scriptDone (_object getVariable [QGVAR(flickerHandle), scriptNull])}, {
|
||||
_object setHit ["light_1_hitpoint", 0.97]; //all possible light hitpoints
|
||||
_object setHit ["light_2_hitpoint", 0.97]; //no lights escape this
|
||||
_object setHit ["light_3_hitpoint", 0.97];
|
||||
_object setHit ["light_4_hitpoint", 0.97];
|
||||
}] call CBA_fnc_waitUntilAndExecute;
|
||||
Reference in New Issue
Block a user