# This is a simple Verse script for setting up a play area. # It uses basic devices you can find in UEFN. # note: In UEFN/Verse, devices (player_spawner, item_granter) are placed # in the editor and referenced via @editable fields — Verse cannot # spawn or position devices at runtime. This script shows how you wire # up and configure those pre-placed devices in code. using { /Fortnite.com/Devices } using { /Fortnite.com/Game } using { /Verse.org/Simulation } using { /UnrealEngine.com/Temporary/Diagnostics } # Attach this class to a Verse Device actor in the UEFN editor. arena_manager := class(creative_device): # Drag your two pre-placed player_spawner devices here in the editor. @editable RedSpawner : player_spawner_device = player_spawner_device{} @editable BlueSpawner : player_spawner_device = player_spawner_device{} # Drag your pre-placed item_granter device here in the editor. @editable ItemGranter : item_granter_device = item_granter_device{} # OnBegin runs automatically when the game session starts. OnBegin() : void = Create_Arena() Create_Arena() : void = # Enable the Red Team Spawn Area. # Team index and spawn settings are configured in the editor # properties of each player_spawner_device (set Team to 1 = Red). RedSpawner.Enable() # Enable the Blue Team Spawn Area. # Set this spawner's Team property to 2 (Blue) in the editor. BlueSpawner.Enable() # Enable the Item Granter so it gives its configured item # to players. Set "Grant on Game Start" and the desired weapon # (e.g., Legendary Assault Rifle) in the device's editor properties. ItemGranter.Enable() Print("Arena is ready! Let's play!")