using { /Fortnite.com/Devices } using { /Fortnite.com/Teams } using { /Fortnite.com/Game } # We define a class for our custom device. # This is like creating a new type of "Super Button" that does complex stuff. TriadCommandCenter := class(creative_device): # EXPOSED VARIABLES: # These appear in the UEFN panel on the right. # You drag and drop the actual devices from your level into these slots. # Think of this as labeling the wires in your office building. Red_Team_Setting : class_and_team_selector_device = class_and_team_selector_device{} Blue_Team_Setting : class_and_team_selector_device = class_and_team_selector_device{} Green_Team_Setting : class_and_team_selector_device = class_and_team_selector_device{} Red_Spawn : player_spawner_device = player_spawner_device{} Blue_Spawn : player_spawner_device = player_spawner_device{} Green_Spawn : player_spawner_device = player_spawner_device{} Red_Grant : item_granter_device = item_granter_device{} Blue_Grant : item_granter_device = item_granter_device{} Green_Grant : item_granter_device = item_granter_device{} Red_Tele : teleporter_device = teleporter_device{} Blue_Tele : teleporter_device = teleporter_device{} Green_Tele : teleporter_device = teleporter_device{} # This event fires when the game starts (the bus launches). OnBegin(): void = # Step 1: Force Team Assignment # We explicitly tell the team settings to apply. # In some modes, this happens automatically, but in Verse, we can be precise. # Note: SetTeamForPlayer() usually happens via the Team Settings device's # own internal logic, but we can trigger other events here. # Step 2: Grant Weapons # We activate the granter devices. # This is the "Welcome Gift" moment. Red_Grant.GrantItemToAll() Blue_Grant.GrantItemToAll() Green_Grant.GrantItemToAll() # Step 3: Teleport Players # We fire the teleporters. # This moves players from the "Lobby" to their "Spawn Room". Red_Tele.Enable() Blue_Tele.Enable() Green_Tele.Enable()