Verse Library verse

01 Device

Adjusts a prop emissive glow intensity when players enter or leave its detection zone.

verse-library/using-prehistoric-galleries-in-fortnite-creative/01-device.verse

# Import the necessary Verse libraries for interacting with the game world
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/Schemas }

# Define our Device. This is like creating a new "Item" in Creative.
# It will sit in the center of our arena.
Ancient Altar Device := class(creative_device):
    # This is a "Variable" - a container that changes.
    # Think of it like a player's HP bar. It starts at 0 (dark) and goes to 1 (glowing).
    AltarGlowAmount : float = 0.0

    # This is an "Event" - something that happens in the game.
    # Like a "Elimination" event, this triggers when a player enters the device's zone.
    OnPlayerEnter := event(player: player):
        # Find the "Altar Prop" in our Scene Graph.
        # We use the Hierarchy to find the specific entity named "Central Altar".
        altar_prop := GetEntity("Central Altar")

        if (altar_prop != none):
            # Get the "Visual" component of the prop.
            # This is like checking the player's skin.
            visual := GetVisual(altar_prop)

            # Change the "Emissive" (glow) intensity.
            # We set it to 1.0, which means "full glow."
            # This is like switching a player's health from 0 to 100.
            SetEmissiveIntensity(visual, 1.0)

            # Update our variable to reflect the new state.
            AltarGlowAmount = 1.0

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