This script provides an intuitive and user-friendly solution for towing and hauling vehicles and props. Unlike other scripts, it attaches vehicles and objects at their exact positions rather than teleporting it to a hardcoded spot. You can attach any number of vehicles/objects, the only limit is the physical space on your tow vehicle.
Players can configure their towing/hauling load however they see fit and let their imagination run wild. By default, there is no limit to what vehicles or objects can be towed, allowing for maximum creativity and roleplay immersion. However, you can configure the script to limit the vehicles that can be used to tow if you wish.
Preview Video
GitHub repo: wp-tow-hauling
Overview
Some examples of what you can do with this script:
- haul multiple offroad / non street legal vehicles to your destination
- haul motorcycle(s) on the back of a pickup truck
- haul boats on a trailer
- haul multiple vehicles using the car carrier trailer (tr2)
- haul cargo on a trailer (crates, pallets, etc)
- create a mobile farmers market on the back of a pickup truck
- create a mobile firework show on a party bus (with wp-fireworks)
- create immersive jobs where players can haul vehicles or props to a destination
The scenarios that can be created with this script are limited only by your imagination.
Best paired with a script that can be used for placing props in the world such as Waypoint Placeables.
Usage
Towing
- Enter tow selection mode by using the command
/tow
or by using the eventwp-hauling:client:startTowSelection
- Look at and select the vehicle you will be towing to
- Look at and select the vehicle/object you want to tow/haul
- Confirm or cancel the selection
- If confirmed, the vehicle/object will be attached to the tow vehicle at its exact position
Repeat steps 1-5 as many times as you like to attach more vehicles/objects.
Untowing
- Enter untow selection mode by using the command
/untow
or by using the eventwp-hauling:client:startUntowSelection
- Look at and select the vehicle/object you want to untow
- Vehicle/object will be unattached and remain in the same position
Performance
This script was written with performance in mind. The only time the resource will run higher than 0.00ms is while in tow/untow select mode when we are running the raycast thread. Otherwise there are no other threads or loops running.
Idle: 0.00ms
With vehicles attached: 0.00ms
Attachment mode active: 0.02ms - 0.08ms (drawing markers + using raycast to detect selection)
- After selection is confirmed resource returns to 0.00ms
Dependencies
This resource was designed to be standalone and does not require any other resources to function.
If you want to use notifications, there is a built in framework wrapper around the Notify()
function to hook into the notifications framework of your choice.
Additional Notes
For the best experience, it is recommended to have a script for placing/carrying/moving props in the world. Waypoint Placeables is a great option for this and also provides ramp items that can be used to easily load vehicles onto trailers.
This script is designed to be immersive and attach vehicles in place. As such it does not teleport vehicles onto your tow vehicle. To be able to tow broken down cars, it is recommended to have a script for pushing broken down cars. You can then place a ramp, and push the vehicle up the ramp onto your tow trailer.