Verse Library verse

01 Device

Sets up editable triggers, win conditions, and timing variables for a central match coordinator.

verse-library/pizza-pursuit-3-creating-the-game-loop-for-time-trial-in-verse/01-device.verse

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# This is our main Game Coordinator device
# Think of it as the 'Referee' of the match
game_coordinator_device := class(creative_device):

    # A trigger device the player walks into to start the race
    # Wire this up in the UEFN editor to your start-zone trigger
    @editable
    StartTrigger : trigger_device = trigger_device{}

    # A trigger device the player walks into to pick up a pizza
    # Wire this up in the UEFN editor to your pickup-zone trigger
    @editable
    PickupTrigger : trigger_device = trigger_device{}

    # A trigger device the player walks into to deliver a pizza
    # Wire this up in the UEFN editor to your delivery-zone trigger
    @editable
    DeliveryTrigger : trigger_device = trigger_device{}

    # Tracks how many pizzas have been delivered
    var PizzasDelivered : int = 0

    # How many pizzas the player must deliver to win
    PizzasToWin : int = 5

    # Tracks remaining time in seconds

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

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