Verse Library verse

01 Device

Tracks player progression through levels, increments counters, and manages basic Deathrun game flow.

verse-library/deathrun/01-device.verse

using /Fortnite.com/Devices
using /Engine/Systems
using /Verse.org/Sim

# This is our main script.
# It runs when the game starts.
deathrun_script := class(creative_device):
    # This is a variable.
    # It stores the current level number.
    current_level := 0

    # This function runs when the game begins.
    OnBegin<override>()<suspends>: void =
        # Print a message to the debug screen.
        print("Deathrun Started! Level 1.")
        
        # Wait for the player to hit a checkpoint.
        # We will bind this later in the editor.
        # For now, we just set up the logic.
        pass

    # This function runs when a level is completed.
    OnLevelComplete(): void =
        # Add 1 to the level counter.
        current_level += 1
        
        # Print the new level number.
        print("Level Complete! You are on Level:", current_level)
        
        # Here you would trigger the next level.

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