How can i set characters' team on spawn?

So basically, i have 6 stacks of ai bots, each stack has 4 bots, spawning every 30 seconds and i need half of them to be Team 0 and the other half Team 1, so i need to set Team variable on spawn. But how do i do it? How do i define which team they belong?

Each bot needs to have a “Team” variable. When you spawn them, have whatever is spawning them immediately access the spawned bot and set the “Team” variable. There should be an output from your spawning node that you can set that information from once you have created the variable in the bot.

Well, that really is up to you. I generally run a loop for “Spawn team 0” and set all the guys being spawned in that loop to 0 and then a loop for “Spawn team 1”. The determination is completely up to you and determined by your project and needs. If you can provide more information on your project I can help you determine what would be the best method.

You could also use a counter, or a flipflop node to alternate.

yeah, i did Team variable, but how do i determine which team does spawned creep belongs to?