When Player Get On
Fires the moment a player climbs into the vehicle.
Introduction
When Player Get On is an event in the Vehicle group of World Events. It fires the moment a player climbs into 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 to welcome the driver aboard: start the engine sound, show the speedometer, or close the doors behind them. 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. Boarding opens the whole driving session: this event fires when a player enters, the ride continues with When Pressing the Pedal , When Speed Up , and When Sliding , and it all ends with When Player Gets Off . Seats, entry points, and who may drive are configured in the Vehicle Asset guide. When Player Get On event in the Uni editor Image The When Player Get On event in the Script Editor.
Parameters
Player the player who climbed into the vehicle Parameter Description
How to Access
How to Access - Event When Player Get On
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 On 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, climb into the vehicle, and check that the actions run the moment you get on.
Example
When Player Get On: Execute Player.Play Audio Audio Volume 100 when-player-get-on-example.png Plays an audio track on the player's device the moment they climb into the vehicle. caption
Common Uses
Engine start sounds Show the driving HUD Close doors or straps for the ride
Tip
Vehicle UI already handles the steering buttons. Use this event for everything the steering UI does not cover.