using { /Fortnite.com/Devices } using { /Verse.org/Simulation } using { /UnrealEngine.com/Temporary/Symbols as Engine } # This is our main script. It runs on the island. TeamVisuals := class(VerseWorld): # This runs when the game starts. OnBegin(): # We watch for players joining the game. # The 'For' loop checks every player slot. For Player : Player in World.GetPlayers(): # We start a background task for this player. Spawn ChangePlayerColor(Player) # This function changes the color. # It takes a Player as input. ChangePlayerColor(Player : Player): # We find the player's character mesh. # This is the 3D model of their body. Mesh := Player.GetMesh() # We check if the mesh exists. If Mesh: # We pick a color based on the player ID. # Even IDs get Blue. Odd IDs get Red. Color := If Player.GetId() % 2 == 0, Engine.LinearColor{R:0.0, G:0.0, B:1.0, A:1.0}, Engine.LinearColor{R:1.0, G:0.0, B:0.0, A:1.0} # We apply the color to the material. # This makes the character glow! Mesh.SetMaterial(0, Color)