Verse Library verse

01 Device

Links UI buttons, timers, and spawners to control progressive enemy waves.

verse-library/configure-the-different-waves/01-device.verse

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Localization }

# 2. THE SCRIPT CLASS: This is your "Island"
wave_controller := class(creative_device):

    # 3. REFERENCES: Connecting our code to the devices in the world
    # Think of these as "cables" from the code to the device
    # Select the matching device in the UEFN Details panel for each property
    @editable
    WaveInfoBillboard : billboard_device = billboard_device{}

    @editable
    StartButton : button_device = button_device{}

    @editable
    WaveTimer : timer_device = timer_device{}

    @editable
    EnemySpawner : creature_spawner_device = creature_spawner_device{}

    # 4. VARIABLES: Tracking our game state
    var CurrentWave : int = 0
    MaxWaves : int = 3

    # 6. BINDING EVENTS: Connecting the triggers to the functions
    # OnBegin runs automatically when the game session starts
    OnBegin<override>()<suspends> : void =

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