I need a way to spawn a new agent in team 2. The problem is that spawn_agent always spawns new agents in team 1 and there is no parameter to choose a team. There is also add_visitors_to_current_scene and it allows to choose a team for agent/agents, but it doesn't return agent_id like spawn_agent does in reg0 and because of that I couldn't reference to that agent, which is something that I need as well.
How to solve this problem? Is there any way to spawn an agent in a team that I want and to get his agent_id?