Reference Verse

Look up which team an agent is on through the team collection — decide friend vs

Updated
The code on this reference page is provided as-is and did not pass the latest compile check — treat the examples as a starting point and verify in your project.

Which team is this player on? Friend or foe?

TeamCollection := GetPlayspace().GetTeamCollection()
Players := GetPlayspace().GetPlayers()
if (You := Players[0], Foe := Players[1]):
    if (Attitude := TeamCollection.GetTeamAttitude[You, Foe]):
        if (Attitude = team_attitude.Hostile):
            Print("Foe spotted!")

Takeaway — Ask the team collection: friend or foe?

Build your own lesson with team_of_agent

Generate a personalized, step-by-step lesson plan built around this object — grounded in this exact reference and our compile-verified knowledge base.

Build a lesson →