A StarfallEx script for Garry's Mod, which allows simfphys vehicles to drive themselves under limited conditions when no driver is present using Wiremod.
Speed control is currently simple and will not adjust accordingly to moving objects in the vehicle's path.
It is recommended to use this script on maps which have walls/fences so the vehicle can recognise where to drive and what is a turn.
To use this script:
- Spawn a simfphys vehicle.
- Place three WireMod rangers with default settings and max distance set at least to 1000 (1500 is recommended, you can type it in) and default to zero disabled, on the vehicle:
- one looking in front of the vehicle
- one looking around 30° - 45° to the left
- one looking around 30° - 45° to the right
- Place a speedometer on the vehicle
- Place a StarfallEx chip on the vehicle and copy the script into the chip.
- Connect the WireMod inputs and outputs of the chip accordingly using
Wiring tool
underWiremod
tab in the spawn menu.
Front, Left, Right should be connected to rangers' distance outputs accordingly.
Speed should be connected to speedometer'sOut
output - Every player with StarfallEx should now be able to use this script's keybinds
- L - toggle pullover mode
- I - go straight
- O - find a left turn and turn there
- P - find a right turn and turn there
Copyright (c) 2020-2021 Lukáš Horáček
Licensed under the GNU General Public License v3.0.