Verse Library verse

01 Device

Listens to a kill tracker and plays victory music through a radio device when a specified streak is reached.

verse-library/elimination-streak-radio/01-device.verse

# This is the blueprint for our "Streak Observer"
# Think of this as the Referee's Notepad and Whistle combined
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# We create a "class" marked as a creative_device — this makes it
# show up in the UEFN editor so you can drag devices into its properties.
# Think of it as a backpack that holds two things: the Kill Count and the Radio.
streak_observer := class(creative_device):

    # The Radio Device we want to control.
    # In the editor, you will drag your Radio device here.
    @editable
    Radio : radio_device = radio_device{}

    # The Tracker Device counting the kills.
    # In the editor, you will drag your Tracker device here.
    @editable
    KillTracker : tracker_device = tracker_device{}

    # This is our "Variable" - a number that changes.
    # We use 'var' so Verse lets us reassign it later.
    # We start at 0.
    var CurrentStreak : int = 0

    # This is the target number.
    # Set this to whatever streak you want (e.g., 5 for a 5-kill streak).
    @editable
    TargetStreak : int = 5

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