Jump to content
duda123

Advanced Tow Ropes

Recommended Posts

Hopefully within a week or two I'll have something for people to try out and give feedback. I'll post it on this forum.

Share this post


Link to post
Share on other sites

setVelocity, right? :/

 

Nope, not using setVelocity for this

Share this post


Link to post
Share on other sites

Nope, not using setVelocity for this

What else? SetPos? oO

Share this post


Link to post
Share on other sites

This will save lots of time, and be great for some missions! Keep up the great work, also will weight come in affect? Would hate idiots in multiplayer/mission towing around Abrams with Quadbikes. lol

  • Like 1

Share this post


Link to post
Share on other sites

This should have been included in the vanilla game..I am so glad someone is doing this...could have used this last night as we usually don't run respawn on vehicles it forces us to repair them and being able to actually tow one back to base would be amazing..if you need testers for MP server capability I'd be happy to do that.

 

 

Diesel

Share this post


Link to post
Share on other sites

I have a private addon published to steam for towing.. it's working on both MP and SP - if anyone want to try this out, add me on steam (http://steamcommunity.com/id/saduda) and I'll share it with you.

 

Towing a train of multiple vehicles is entertaining.

Share this post


Link to post
Share on other sites

Looking for some people to help test this out before publishing on steam.

 

Easiest way to get this running is to copy the source here:

 

https://github.com/sethduda/AdvancedTowing/blob/master/addons/SA_AdvancedTowing/functions/fn_advancedTowingInit.sqf

 

and put it into a mission's init.sqf file.

 

Then, once the mission starts, you should be able to walk up to any vehicle, boat or aircraft and take out its tow ropes. Then, with the ropes in hand, walk over to another vehicle, boat or aircraft (including destroyed vehicles). You should be able to attach the tow ropes. 

 

Should work on both SP and MP.

Share this post


Link to post
Share on other sites

So I have been testing this its up on my small server and I did notice that on a few vehicles the rope seems to be a few feet away from the bumper of the towed vehicles..especially on modded vehicles such as RHS Humvee's..everything works as it should and its not a big deal but I did notice that small detail...really like the towing though its one of those things that I always wondered why it wasn't in the game from the start. Its great for me because we usually run very long vehicle respawn times if at all so getting a vehicle back to base for repairs is crucial.

 

 

Diesel

Share this post


Link to post
Share on other sites

So I have been testing this its up on my small server and I did notice that on a few vehicles the rope seems to be a few feet away from the bumper of the towed vehicles..especially on modded vehicles such as RHS Humvee's..everything works as it should and its not a big deal but I did notice that small detail...really like the towing though its one of those things that I always wondered why it wasn't in the game from the start. Its great for me because we usually run very long vehicle respawn times if at all so getting a vehicle back to base for repairs is crucial.

 

 

Diesel

Yeah, I've see that as well. Can you check to see if the advanced sling loading has the same problem on the modded vehicles?

Thanks!

Share this post


Link to post
Share on other sites

Diesel, I've updated github to fix this problem. I've also added a message if you try to attach a vehicle that's too far away. Can you give the new version a try?

Share this post


Link to post
Share on other sites

Diesel, I've updated github to fix this problem. I've also added a message if you try to attach a vehicle that's too far away. Can you give the new version a try?

Much better..the ropes go into or under the front as they should and I can confirm the message works if you are too far away.

I unfortunately haven't tried the advanced sling loading yet..I don't fly but I'll talk my clan pilot and maybe we can do some testing tonight on that.

Have you thought about making it possible to pull a medium sized cargo container or a Huron container? We use the Huron containers with a script that loads them on the back of the Hemmt truck but the ability to drag them out of a hanger or such would be cool..we also use the medium Cargo containers when we set up FOB's..just a thought.

I'll see about checking the Sling Loading tonight and get back to you.

 

Diesel

Share this post


Link to post
Share on other sites

What do you think about putting in some restrictions on what can be towed?

 

I was thinking about maybe making it only possible to tow something if the vehicle you're in is greater than 1/4th? the mass of the object being towed. This would prevent someone from towing a tank with a quad.

 

Yeah, I might be able to add containers to the list of draggable objects. Any idea if there's a common class that all containers inherit from?

Share this post


Link to post
Share on other sites

What do you think about putting in some restrictions on what can be towed?

 

I was thinking about maybe making it only possible to tow something if the vehicle you're in is greater than 1/4th? the mass of the object being towed. This would prevent someone from towing a tank with a quad.

 

Yeah, I might be able to add containers to the list of draggable objects. Any idea if there's a common class that all containers inherit from?

I would definetly restrict it..maybe to you have to use a Hemmt truck.any of the variants I think,I wouldn't use a Hunter or a pick up to tow something that big..also maybe do the Huron Containers (Cargo,Medical,Repair,Fuel) and then just the Medium size Cargo containers..the full size long containers may be too much. I think the Classes are listed on Wiki and the only difference for the Cargo containers is the color but I think the Huron Containers are all different because they look physically different. Not sure if you can a drag coefficient to them or not either so as not to have people towing them down the road at 80km/hr..mainly it would be used for towing them a short distance to load on a Hemmt Truck or to lift with the Helo.

 

Diesel

Share this post


Link to post
Share on other sites

Here are the classnames for the Huron Support Containers

 

"B_Slingload_01_Fuel_F"

"B_Slingload_01_Cargo_F"

"B_Slingload_01_Medevac_F"

"B_Slingload_01_Repair_F"

"B_Slingload_01_Ammo_F"

 

And Medium Cargo Containers

 

[Objects]
"Land_Cargo20_red_F"
[Objects]
"Land_Cargo20_yellow_F"
[Objects]
"Land_Cargo20_white_F"
[Objects]
"Land_Cargo20_sand_F"
[Objects]
"Land_Cargo20_orange_F"
[Objects]
"Land_Cargo20_blue_F"
[Objects]
"Land_Cargo20_military_green_F"
[Objects]
"Land_Cargo20_brick_red_F"
[Objects]
"Land_Cargo20_cyan_F"
[Objects]
"Land_Cargo20_light_green_F"
[Objects]
"Land_Cargo20_grey_F"
[Objects]
"Land_Cargo20_light_blue_F"

 

Not sure if that helps at all..oh and the Hemmt script I use is from Tcann on Armaholic called Modular Hemmt System..it just allows you to load a huron container on the back of a standard Hemmt Truck. I'd post a link but not sure if that's ok here or not.

 

 

Hope this helps,

 

Diesel
 

Share this post


Link to post
Share on other sites

Awesome, thanks. I'll add these into the script so you can tow them.

 

I'll also add the ability for the mission maker to override what can can't be towed.

 

e.g. you would be able to define a variable in the init.sqf file like this:

 

SA_TOW_OVERRIDES = [

   ["B_MRAP_01_F","CAN_TOW","Land_Cargo20_light_blue_F"],

   ["B_MRAP_01_F","CANT_TOW","Land_Cargo20_light_green_F"],
   ["Ship","CANT_TOW","Land_Cargo20_light_green_F"],
   ["B_MRAP_01_F","CANT_TOW","Ship"]

];

 

This would let the B_MRAP_01_F tow Land_Cargo20_light_blue_F but prevent it from towing Land_Cargo20_light_green_F and all vehicles of type Ship. Also, it would prevent ships from towing Land_Cargo20_light_green_F.

 

These would override the default settings, so if you don't have a rule setup in that variable, the default settings will apply.

  • Like 1

Share this post


Link to post
Share on other sites

Ok, I've updated the source, but haven't tested it yet. Will try it out later. Feel free to give it a try, but it might have some scripting errors.

 

Also, if you attempt to attach a tow rope to a non-towable vehicle, it will say "Cannot attach tow rope" in the action menu, and will show a hint if you select that action. It will hint to the player "Your vehicle is not strong enough to tow this. Find a larger vehicle!"

 

Here are the default rules:

 

SA_TOW_RULES = [
["Tank","CAN_TOW","Tank"],
["Tank","CAN_TOW","Car"],
["Tank","CAN_TOW","Ship"],
["Tank","CAN_TOW","Air"],
["Tank","CAN_TOW","Cargo_base_F"],
["Car","CAN_TOW","Car"],
["Car","CAN_TOW","Ship"],
["Car","CAN_TOW","Air"],
["Car","CANT_TOW","Helicopter"],
["Car","CANT_TOW","Truck_F"],
["Truck_F","CAN_TOW","Car"],
["Truck_F","CAN_TOW","Helicopter"],
["Truck_F","CAN_TOW","Cargo_base_F"],
["Ship","CAN_TOW","Ship"]
];
 
Tanks: Can tow tanks, cars, ships, air and cargo containers
Cars (except trucks - which are a type of car): can tow cars (excluding trucks), ships and air (excluding helicopters)
Trucks: Can tow cars (including trucks), ships, air and cargo containers
Ships: Can tow ships
 
You can override / add additional rules by setting the SA_TOW_RULES_OVERRIDE variable in init.sqf:
 
e.g. This would override everything and let all vehicles tow all other vehicles:
 
SA_TOW_RULES_OVERRIDE = [
  ["AllVehicles", "CAN_TOW", "AllVehicles]
];
  • Like 1

Share this post


Link to post
Share on other sites

 

Ok, I've updated the source, but haven't tested it yet. Will try it out later. Feel free to give it a try, but it might have some scripting errors.

 

Also, if you attempt to attach a tow rope to a non-towable vehicle, it will say "Cannot attach tow rope" in the action menu, and will show a hint if you select that action. It will hint to the player "Your vehicle is not strong enough to tow this. Find a larger vehicle!"

 

Here are the default rules:

 

SA_TOW_RULES = [
["Tank","CAN_TOW","Tank"],
["Tank","CAN_TOW","Car"],
["Tank","CAN_TOW","Ship"],
["Tank","CAN_TOW","Air"],
["Tank","CAN_TOW","Cargo_base_F"],
["Car","CAN_TOW","Car"],
["Car","CAN_TOW","Ship"],
["Car","CAN_TOW","Air"],
["Car","CANT_TOW","Helicopter"],
["Car","CANT_TOW","Truck_F"],
["Truck_F","CAN_TOW","Car"],
["Truck_F","CAN_TOW","Helicopter"],
["Truck_F","CAN_TOW","Cargo_base_F"],
["Ship","CAN_TOW","Ship"]
];
 
Tanks: Can tow tanks, cars, ships, air and cargo containers
Cars (except trucks - which are a type of car): can tow cars (excluding trucks), ships and air (excluding helicopters)
Trucks: Can tow cars (including trucks), ships, air and cargo containers
Ships: Can tow ships
 
You can override / add additional rules by setting the SA_TOW_RULES_OVERRIDE variable in init.sqf:
 
e.g. This would override everything and let all vehicles tow all other vehicles:

 

SA_TOW_RULES_OVERRIDE = [
  ["AllVehicles", "CAN_TOW", "AllVehicles]
];

 

Cool..I'll give it a shot later and let you know if I run across any errors. Thanks!

 

 

Diesel

Share this post


Link to post
Share on other sites

Also, by default, only vehicles of type Car, Ship and Tank can do the towing.

 

You can change this by setting this in init.sqf:
 
e.g. 
 
SA_TOW_SUPPORTED_VEHICLES = [ "Air", "Ship" ];

 

(This would only let you take the tow ropes for Air and Ship vehicles)

 

Here's another example:

 

SA_TOW_SUPPORTED_VEHICLES = [ "AllVehicles" ];


SA_TOW_RULES_OVERRIDE = [
  ["AllVehicles", "CAN_TOW", "AllVehicles"]
];
 
This would let you deploy tow ropes from every vehicle and attach it to any vehicle. This would probably include ground units as well, which would be kinda odd (I guess a player could pull a boat, which would be neat)
  • Like 1

Share this post


Link to post
Share on other sites

Published an update to GitHub to fix a few things:

 

1. Prevents vehicle from "spinning" around the towing vehicle.

2. The towed vehicle now moves a bit smoother.

3. The towed vehicle no longer gets stuck in one position if the tower isn't moving.

4. Resolved some problems with boat towing.

 

Issues I've seen:

 

The cargo containers aren't oriented the same way as vehicles, so you can end up pulling them sideways.

 

Things I'm working on:

 

I have code in there that lets you attach the tow ropes to any side of the cargo, but need to work out how to adjust the vehicle rotation when being pulled.

  • Like 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×