Verse Library verse

01 Fragment

Custom device that changes day sequence lighting and intensity when players enter a trigger volume.

verse-library/sunlight/01-fragment.verse

# This line imports the tools we need to talk to the Day Sequence Device.
# Think of this as grabbing your walkie-talkie before starting the mission.
using /Fortnite.com/Devices

# We define a new "Device" called `MoodSunlight`.
# This is like placing a new device in the editor, but it has custom brainpower.
device MoodSunlight : IScheduledDevice =
    # VARIABLES: These are the settings we can tweak.
    # 'var' means Variable. It can change.
    # 'const' means Constant. It is locked when you hit Play.
    
    # This is the Trigger Volume we want to watch.
    # We leave it blank here, and you'll drag-and-drop the device in the editor.
    trigger_volume : TriggerVolumeDevice = ?
    
    # This is the Day Sequence Device that controls the sun.
    sun_device : DaySequenceDevice = ?
    
    # These are our "Mood" settings.
    # We set them as constants here, meaning they are fixed for this script.
    # You can change these numbers to adjust the vibe.
    const zombie_intensity : float = 3.0  # Dimmer than normal sun (normal is ~5-6)
    const zombie_color : Color = { R: 0.2, G: 0.5, B: 0.2 } # Sickly green tint
    const flare_enabled : bool = false # No sun flares, just creepy light

    # This function runs every frame.
    # Think of it as the game checking "Is anyone in the trigger box?" 60 times a second.
    OnBegin<override>()<suspends>:
        # We wait for the trigger volume to be activated.
        # 'WaitFor' is like waiting for the bus. The script pauses here

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