get teams im verse

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

I encountered a problem that when the round ends, the teams move. But using this code, the player always ends up in team 1, although he is in team 2. I tried to test it in every possible way, but I couldn’t find a solution. Does anyone have any thoughts on this matter. I checked via verse there are two teams in the game

Steps to Reproduce

AllPlayers := GetPlayspace().GetPlayers()
for (Player : AllPlayers):
if (Agent := player[Player]):
if(GetPlayspace().GetTeamCollection().GetTeam[Agent] = Teams[0]):
Print(“TEAM 1”)
TeleportRed.Teleport(Agent)
else if(GetPlayspace().GetTeamCollection().GetTeam[Agent] = Teams[1]):
Print(“TEAM 2”)
TeleportBlue.Teleport(Agent)

Expected Result

i get only team 1. its not true.

Observed Result

i get only first team

Platform(s)

pc

I don’t understand the issue there, you’re always spawning in Team 1 when you’re alone ?

sorry for the bad explanation. Yes, there are two teams in the game, but when using this code, players always appear in the first teleporter, as if they were in team 1.

Ok so when you open the scoreboard, you’ll see the two teams ?

You tested the bug with multiple people ?

yes I see two teams and they all teleport as team number 1

Well I don’t know what you’re doing exactly, but I’m pretty sure this is not a bug, I’m switching teams all the time in Verse and it works, maybe check your Teleporter Settings, and that the references are correct

I can definitely confirm this behaviour. I’ve been having the same issue with my round-based game. My teams switch after the end of each round (Team 1 becomes Team2, and vice versa) but the team objects doesn’t change their index/position in the TeamCollection array. In other words, if Team 1 was at Index 0 during round 1, and they switch on the next round to become Team 2, that team will still be at Index 0 in the TeamCollection array.

It’s been incredibly painful to figure out which Team object belongs to which team in the game. I still don’t have a proper solution for this.

1 Like