Author Topic: Spawning a new agent in a specified team- spawn_agent always spawns agents in t1  (Read 935 times)

0 Members and 1 Guest are viewing this topic.

Offline Pio

  • Sergeant
  • *
  • Posts: 47
    • View Profile
    • my steam profile
  • Side: Neutral
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?