Alright, this is a really weird one, and I wouldn’t be surprised if it’s impossible. Despite this, I’d still really like to get this working…
So basically, I figured out how to use prop_vehicle_driveable in Portal 2, and now have functional HL2 Jeeps implemented in the game. However, they suffer from some really big limitations:
-The camera is not placed properly (you look into the side of the vehicle). I fixed this with a point_viewcontrol, pretty simple.
-The controls are disfunctional. However, the car can be manipulated by I/O, so I fixed that with some fancy logic circuits, sort of.
-It can’t be controlled by I/O until a player enters the vehicle. Therefore, the player MUST be inside the car before it can be driven.
-You can’t exit the vehicle; apparently, some bug in Portal 2 prevents vehicles and game_ui from exiting on pressing the jump key or use.
That last issue is my biggest problem; although game_ui can be disabled with the “Deactivate” input, the prop_vehicle_driveable doesn’t have an input to eject the driver. I tried Deactivate and ExitVehicle, and both failed. I can’t just kill the vehicle and respawn it, either, as killing it while a player is driving crashes the game. The only way to make the player exit the vehicle properly is by killing the player. While this works beautifully in Multiplayer, as the player can just respawn and do as they please from there, in Single Player the map resets, which sort of takes the fun out of everything.
Is there any way to forcefully eject a driver that works on all vehicles, and not just specific entities? Is there a way to kill the player without actually killing them? Could either potentially be done by Vscript, or by some obscure entity?