# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/team-elimination-game-8-final-result-in-verse
# Local doc: epic-docs/documentation/en-us/uefn/team-elimination-game-8-final-result-in-verse.md
# Section: Complete Script
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Fortnite.com/Teams }
using { /Verse.org/Simulation }
player_map := [player]int # This is a type alias!
team_elimination_game := class(creative_device):
@editable
EndGameDevice : end_game_device = end_game_device{}
@editable
var WeaponGranters : []item_granter_device = array{}
@editable
var PlayerSpawners : []player_spawner_device = array{}
@editable
var Sentries : []sentry_device = array{}
var EliminationsToEndGame : int = 0
var Teams : []team = array{}
# Map of Team Maps, where the key is the team and the value is a map of
# player->int key-value pairs
var TeamMap : [team]player_map = map{}
OnBegin<override>()<suspends> : void =
set Teams = GetPlayspace().GetTeamCollection().GetTeams()
set EliminationsToEndGame = WeaponGranters.Length
Print("Beginning to assign players")
PopulateTeamsAndPlayers()
for (Spawner : PlayerSpawners):
Spawner.SpawnedEvent.Subscribe(OnPlayerSpawn) # Subscribe to each player spawn pad
Verse Library
verse
01 Complete Script
Initializes team elimination gameplay, assigns players to teams, and subscribes to device events.
extracted-snippets/documentation/en-us/uefn/team-elimination-game-8-final-result-in-verse/01-complete-script.verse
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.