Verse Library verse

01 Device

Monitors trigger zones to automatically update and track red and blue team scores.

verse-library/game-ends/01-device.verse

# ScoreManager.verse
# This script tracks team scores and updates the UI.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Game }

# Define our main device. This is the "Container" for our logic.
# Think of it like a Prop Mover device, but instead of moving props, it moves data.
ScoreDevice := class(creative_device):

    # A reference to the Score Manager device placed in the level.
    # Wire this up in the UEFN editor to the Score Manager device for Team 1.
    @editable
    RedScoreManager : score_manager_device = score_manager_device{}

    # Wire this up in the UEFN editor to the Score Manager device for Team 2.
    @editable
    BlueScoreManager : score_manager_device = score_manager_device{}

    # A reference to the two Trigger devices placed in the level.
    # Wire RedTrigger to the Team 1 capture zone trigger in the editor.
    @editable
    RedTrigger : trigger_device = trigger_device{}

    # Wire BlueTrigger to the Team 2 capture zone trigger in the editor.
    @editable
    BlueTrigger : trigger_device = trigger_device{}

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