Verse Library verse

01 Fragment

Manages match rounds by tracking state, handling timers, and resetting player positions.

verse-library/fortnite-uefn-verse-simple-1v1-round-manager-spawn-reset-score/01-fragment.verse

# This is our Round Manager. It controls the flow of a 1v1 match.
# Think of this as the referee device.

# --- EDITABLE PROPERTIES ---
# These are the "slots" you fill in the editor. 
# They are Constants because they don't change during the game logic, 
# but you set them once in the device settings.

RoundTime: float = 60.0 # How many seconds per round. Like a storm timer.
MaxRounds: int = 10     # Total rounds in the match.

# We need to connect our Verse script to the devices in the world.
# This is like plugging a controller into the console.
SpawnPad: PlayerSpawnerDevice = ? # Drag your Player Spawner here.
ScoreMgr: ScoreManagerDevice = ?  # Drag your Score Manager here.
RoundTimer: TimerDevice = ?       # Drag your Timer here.
TeleportToHub: TeleporterDevice = ? # Drag your Teleporter here.

# --- GAME STATE ---
# These are Variables. They change as the game plays.
CurrentRound: int = 0
GameActive: bool = false

# --- FUNCTIONS ---

# This function starts a new round.
# It's like pressing the "Start Match" button.
StartRound := func(): void =
    # Increment the round counter (1, 2, 3...)
    CurrentRound += 1

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