When Player Get Off
Fires the moment a player leaves the vehicle.
Introduction
When Player Get Off is an event in the Vehicle group of World Events. It fires the moment a player leaves the vehicle. Like every event, it does nothing by itself. It waits for the right moment, then runs all the actions connected to it. Use it for the exit routine: kill the engine, hide the HUD, or make sure the vehicle does not roll away driverless. When it fires, the event hands one value to your script: player, the player this moment belongs to. This event belongs to the Vehicle component. Open the Vehicle component guide to see everything the component itself can do. Every ride ends with an exit: this event closes the session opened by When Player Gets On , and it is the safe place to reset seats, cameras, and leftover speed. The driving in between is reported by When Pressing the Pedal and When Speed Up , and exit rules live in the Vehicle Asset guide. When Player Get Off event in the Uni editor Image The When Player Get Off event in the Script Editor.
Parameters
Player the player who left the vehicle Parameter Description
How to Access
How to Access - Event When Player Get Off
How to Use
Select the vehicle in the World Editor and open its Propertie (the blue equalizer icon), then scroll to the Vehicle section — the When Player Get Off event is already listed there under Vehicle Events. Press the + button below the event to add a script, then press Edit on that script to open the script editor and build the actions that should run when the event fires. Press Play, ride the vehicle, then get off and check that the actions run.
Example
When Player Get Off: Execute Player.Stop Audio when-player-get-off-example.png Stops the player's audio the moment they leave the vehicle. caption
Common Uses
Engine off and HUD cleanup Auto-park the vehicle Eject penalties or effects
Tip
Players can exit a moving vehicle. Decide here whether it should brake, keep rolling, or coast to a stop.