Jump to content
Sign in to follow this  
BeastlyFX

Need some help with wasteland towing.

Recommended Posts

Hey there guys! I'm having a lot of trouble figuring out this issue here and would like some help. :)

Here's the situation:

Vehicles that spawn on the map naturally are given the ability to tow and to be towed to.

Vehicles that are bought/purchased/spawned on missions do not have this ability.

Here is the script that spawns vehicles for the car shop.

_createAndApplyapplyVehProperties = 
{
   private ["_vehicle", "_colorText","_texturePath", "_type", "_pos"];
_pos = _this select 0;
_type = _this select 1;
_colorText = _this select 2;

if (_deliveryMethod == _DELIVERY_METHOD_AIRDROP) then {
	_spawnType = "FLY";
} else {
	_spawnType = "NONE";
};

_vehicle = createVehicle [_type,_pos, [], 0, _spawnType];
//_vehicle disableTIEquipment true; // Disable Thermal on bought vehicles. Mission based ones are more powerful
//_veh setDir _dir;
_vehicle setVariable ["newVehicle",1,true];

_texturePath = "";

//if they chose a color set the color
if(_colorText == "Orange") then { _texturePath = '#(argb,8,8,3)color(0.82,0.2,0,1)';};
if(_colorText == "Red") then { _texturePath = '#(argb,8,8,3)color(0.79,0.03,0,1)';};
if(_colorText == "Pink") then { _texturePath = '#(argb,8,8,3)color(0.91,0.53,0.57,1)';};
if(_colorText == "Yellow") then { _texturePath = '#(argb,8,8,3)color(1,0.97,0.17,1)';};
if(_colorText == "Purple") then { _texturePath = '#(argb,8,8,3)color(0.43,0.18,0.67,1)';};
if(_colorText == "Blue") then { _texturePath = '#(argb,8,8,3)color(0,0.1,0.8,1)';};
if(_colorText == "Dark Blue") then { _texturePath = '#(argb,8,8,3)color(0.03,0.02,0.35,1)';};
if(_colorText == "Green") then { _texturePath = '#(argb,8,8,3)color(0.01,0.64,0,1)';};
if(_colorText == "Black") then { _texturePath = '#(argb,8,8,3)color(0,0,0,1)';};
if(_colorText == "White") then { _texturePath = '#(argb,8,8,3)color(1,1,1,1)';};
if(_colorText == "Teal") then { _texturePath = '#(argb,8,8,3)color(0,0.93,0.86,1)';};
_vehicle setVariable ["textureName", _texturePath];

if(_texturePath != "") then
{
	serverRelaySystem = [MESSAGE_VEHICLE_PROPERTIES_APPLY, _vehicle, _texturePath];
	publicVariable "serverRelaySystem";
};

//tell the vehicle to delete itself after dying
_vehicle addEventHandler ["Killed",{(_this select 0) spawn {sleep 180; deleteVehicle _this}}];

//enable vehicle locking
_vehicle setVariable ["objectLocked", true, true]; //force lock
_vehicle addAction ["Unlock / Lock","client\functions\unlocklock.sqf",[],7,true,true,"","(_target distance _this) < 7"];
_vehicle setVariable ["buyer", getPlayerUID _player, true]; //s3kShUn61
   _vehicle setVariable ["R3F_LOG_disabled", false, true];
};

The addon that runs the towing/towing to is the R3F_Logistics one.

Share this post


Link to post
Share on other sites

You need to add in something to this script in order for the R3F scripts to apply to it. I can't see anything in this script that is stopping the R3F scripts from running on it.

I'm not currently familiar with their scripting, but I remember they have some documentation you can read either in the download or on their website that deals with dynamic addition of their scripts.

Check the R3F documentation on this page:

http://forums.bistudio.com/showthread.php?94280-R3F-Artillery-and-Logistic-Manual-artillery-and-advanced-logistic-(mission-script)

Not sure if there's more up to date documentation, but that's the one I can remember that has answers to your questions.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×