sethduda / AdvancedTowing

Advanced Towing (Arma 3)
http://steamcommunity.com/sharedfiles/filedetails/?id=639837898
33 stars 27 forks source link

Add checks for locked vehicles which could be optional ... #7

Closed Ghostrider-DbD- closed 8 years ago

Ghostrider-DbD- commented 8 years ago

One can add this check by changing line 387 of advancedTowing.sqf to:

    not([_towVehicle,_vehicle] call SA_Is_Supported_Cargo) && vehicle player == player && player distance _vehicle < 10 && _towVehicle != _vehicle && locked _vehicle == 0; 

I would think the code in this block could be modified to do the check based on a setting using an additional if () then {} or possible a switch () do {};

I have tested this on an Exile server and confirmed that the basic approach works. I will be giving it a try on Epoch as well over the next day.

sethduda commented 8 years ago

Ghostrider, this might already be done. See lines 372 - 374:

        if!(missionNamespace getVariable ["SA_TOW_LOCKED_VEHICLES_ENABLED",false]) then {
            _canBeTowed = _canBeTowed && locked _cargo <= 1;
        };

By default, you can't attach ropes to locked vehicles. However, you can put this in your init.sqf file to allow towing locked vehicles:

SA_TOW_LOCKED_VEHICLES_ENABLED = true;

See #1

Ghostrider-DbD- commented 8 years ago

Missed that line - you are correct that the attach rope options are only active when the vehicle is unlocked. This thread should be closed.