Is it possible to convert a team variable to an integer? For example, if I grab team 3, can I convert this to the integer 3?
I’m not sure about a direct way to do this. What do you want it for? Maybe there is a workaround?
You can’t convert an individual team to an integer but you can get the index of a team in the teams array using something like this
GetTeamNumber(TeamToCheck:team)<decides><transacts>:int=
var TeamIndex:?int = false
for (Index -> Team : GetPlayspace().GetTeamCollection().GetTeams()):
if (Team = TeamToCheck):
set TeamIndex = option{ Index }
TeamIndex?
3 Likes
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.