Creating a game of tag
There will be 1 tagger and 6 runners. When a tagger hits a runner, the runner turns into a tagger. For this gamemode, team deathmatch will be used. These are the settings I used:
MODES
● TEAM DEATHMATCH
◆ GAMEMODE START: IMMEDIATELY
◆ SCORE TO WIN: 200
◆ SELF INITIATED RESPAWN: OFF
◆ SPAWN HEALTH PACKS: DISABLED
HEROES
● RUNNER
◆ LUCIO
▶ AMP IT UP: OFF
▶ CROSSFADE: OFF
▶ HEALTH: 10%
▶ PRIMARY FIRE: OFF
▶ QUICK MELEE: OFF
▶ SOUNDWAVE: OFF
▶ ULTIMATE ABILITY (SOUND BARRIER): OFF
● TAGGER
◆ LUCIO
▶ CROSSFADE: OFF
▶ PRIMARY FIRE: OFF
▶ SOUNDWAVE: OFF
▶ ULTIMATE ABILITY (SOUND BARRIER): OFF
● LUCIO
● RUNNER MAX PLAYERS: 6
● TAGGER MAX PLAYERS: 1
This makes it so the only hero allowed is Lucio. The tagger lucio can one-hit-kill and can only melee. Do not set the respawn timer too low, or else the bot may not be able to detect a death.
To start, create an object instance of CustomGame from the CustomGameOW namespace.
using System;
using System.Collections.Generic;
using CustomGameOW;

namespace CustomgameBotLibrary_Tag
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            CustomGame cg = new CustomGame();
        }
    }
}
If a runner dies, we need the bot to switch them to become a tagger. We can use the method CustomGame.PlayersDead to get a list of dead players.
[STAThread]
static void Main(string[] args)
{
    CustomGame cg = new CustomGame();

    while (true)
    {
        List<int> runners = cg.BlueSlots; // Get list of slots filled in blue team (runners)
        List<int> playersDead = cg.PlayersDead(runners); // Get list of players dead that are in blue team.
    }
}
We can use the method CustomGame.Move to swap the tagger and the player that was tagged's team.
[STAThread]
static void Main(string[] args)
{
    CustomGame cg = new CustomGame();

    while (true)
    {

        List<int> runners = cg.BlueSlots; // Get list of slots filled in blue team (runners)
        List<int> playersDead = cg.PlayersDead(runners); // Get list of players dead that are in blue team.
        if (playersDead.Count > 0)
        {
            cg.Move(playersDead[0], 6); // Swaps the player who was tagged and the tagger.
        }
    }
}
When the tagger tags someone, we can start a countdown by pausing and then unpausing the game. We can also send a message to the chat telling the server that there is a new tagger.
[STAThread]
static void Main(string[] args)
{
    CustomGame cg = new CustomGame();

    while (true)
    {

        List<int> runners = cg.BlueSlots; // Get list of slots filled in blue team (runners)
        List<int> playersDead = cg.PlayersDead(runners); // Get list of players dead that are in blue team.
        if (playersDead.Count > 0)
        {
            cg.Pause(); // Pause the game.
            cg.Move(playersDead[0], 6); // Swaps the player who was tagged and the tagger.
            cg.Chat("There is a new tagger!");
            cg.Unpause(); // Unpause the game.
        }
    }
}