Verse Library verse

01 Fragment

Listens for player entry into volumes and updates their active racing track state.

verse-library/rr-active-track-volume-devices/01-fragment.verse

# This is a conceptual representation of what the device does internally.
# You don't need to write this code to use the device, but it helps to know it's event-driven.

OnPlayerEnterVolume: Event(
    Player: Player,
    Volume: RR_Active_Track_Volume
) = {
    # When a player hits this volume, the game engine updates their state.
    # It doesn't move the car. It just updates the "Active Track" variable for that player.
    Player.Set_Active_Track(Volume.Target_Track)
}

Comments

    Sign in to vote, comment, or suggest an edit. Sign in