-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dragging - Additional weight override parameter for setCarryable/setDraggable #6780
Conversation
…raggable - Additional optional parameter that ignores the `startCarry`/`startDrag` weight checks. - Minor `==` to `isEqualto` replacements
- remove \t
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of scopeName
/breakTo/Out
.
Should be written it like this imo:
if (!GETVAR(_target,GVAR(ignoreWeightCarry),false) && {
private _weight = [_target] call FUNC(getWeight);
_weight > (GETMVAR(ACE_maxWeightCarry,1E11))
}) exitWith {
[localize LSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured);
};
for Should I skip the variable and do |
Either is fine I think, but I prefer more locals (with descriptive names) instead of long lines that are hard to read. |
Co-Authored-By: PiZZAD0X <509thparachuteinfantry@gmail.com>
Co-Authored-By: PiZZAD0X <509thparachuteinfantry@gmail.com>
@@ -27,4 +27,4 @@ if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false}; | |||
// a static weapon has to be empty for dragging (ignore UAV AI) | |||
if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; | |||
|
|||
alive _target && {vehicle _target == _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} | |||
alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isEqualTo
uppercase To
.
…raggable (#6780) * Added weight override parameter to ace_dragging_fnc_setCarryable/setDraggable - Additional optional parameter that ignores the `startCarry`/`startDrag` weight checks. - Minor `==` to `isEqualto` replacements * `count crew _target isEqualto -1` to `count crew _target isEqualto 0` * Tab Replacement - remove \t * Reverted UAV check, Params formatting, Lazy Eval * Update addons/dragging/functions/fnc_startCarry.sqf Co-Authored-By: PiZZAD0X <509thparachuteinfantry@gmail.com> * Update fnc_startDrag.sqf * Remove beta suggestion extra line additions * Update addons/dragging/functions/fnc_startDrag.sqf Co-Authored-By: PiZZAD0X <509thparachuteinfantry@gmail.com>
When merged this pull request will:
Add an additional optional parameter to the
ace_dragging_fnc_setCarryable
andace_dragging_fnc_setDraggable
functions that sets a object variable that can skip the weight check inace_dragging_fnc_startCarry
andace_dragging_fnc_startCarry
respectively.Existing function parameter format is
[object, true, [0,1,1], 0] call ace_dragging_fnc_setCarryable;
which is compatible with this PR.eg.
[object, true, [0,1,1], 0, true] call ace_dragging_fnc_setCarryable;
would override the carry weight check on the object.
This would be useful if mission makers want the ability to carry/drag a specific heavy object without disabling/nullifying the weight checks globally, similar to how mission makers could use
setMass
in the past.Addresses setMass 1, still can't lift #4141
Test mission with objects below and over weight limit, with and without function.
ACE_carryWeightExceptionTest.VR.zip