Verse Library verse

01 Fragment

Activates a prop color change and sound effect when a player steps on a trigger, then resets.

verse-library/using-sports-galleries-in-fortnite-creative/01-fragment.verse

# This script attaches to a Trigger Volume placed inside our Sports Arena.
# When a player walks in, it triggers a celebration effect.

using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/Slate/Widgets }
using { /UnrealEngine.com/Temporary/Components }

# Define our Celebration Device. This is the "Brain" of our arena.
# In Verse, we define what our device can *do* and what data it holds.
# Think of this like defining the rules of a mini-game.
template CelebrationArenaDevice: DeviceData() = const:
    # 'Trigger' is a component we attach to the device.
    # It acts like a 'Tripwire' in Fortnite Creative.
    Trigger: TriggerDevice = Device:CreateDevice<TriggerDevice>()
    
    # 'CelebrationProp' is the Sports Gallery piece we want to affect.
    # We'll link this in the editor later.
    CelebrationProp: PropMoverDevice = Device:CreateDevice<PropMoverDevice>()

# This function runs when the Trigger is activated.
# It’s like the 'Elimination' event firing.
on Trigger.Triggered<TriggeredEvent>() = async ():
    # Change the color of our Sports Gallery prop to Neon Green.
    # This is the 'Game Mechanic' part: Player hits trigger -> Prop changes.
    CelebrationProp.SetColor(Color: #00FF00FF)
    
    # Play a sound effect (optional, but adds flair).
    # We'll use a simple beep for now.
    CelebrationProp.PlaySound(Sound: /Game/FortniteSounds/Beep.Beep)

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