This is a description of a game mode in which team1 must push and capture different points in the map. As they capture a point, new spawn points open and lead to the second part of the map. Team2 must defend from team1, if team2 recaptures a point, that part of the map is closed, and the map phase reverts to the one before it.
Initilize1: Initialize one sets the air spawns at the start of the match. In some cases, it also defines the battlefield boarder.
Initilize2: initialize two sets the first set of spawn points and capture points. These are the spawns and captures that are used in the first phase of the map. Since the players need a place to spawn initially, these objects need to be defined outside of the CaptureNext (*)/Spawnfaze(*) loop.
Spawnfaze1: Spawnfaze1 by default is deactivated. Spawnfaze1 is activated by CaptureNext1. Once activated, it only proceeds if capture point A is captured by team2. Spawnfaze1 is the redefinition of initialize2 and the deactivation of the second set of spawns within the CaptureNext/ Spawnfaze(*)loop. After the redefinition occurs, The CaptureNext function is called. This function is the second part of the loop that moves spawns based on who has captured a particular point.
CaptureNext1: CaptureNext1 defines the next captures and spawn points only when team 1 has captured the specified point. It also deactivates the spawns of the first phase of the map. After this, Spawnfaze1 is enabled and activated.
CaptureNext1 and Spawnfaze1: CaptureNext1 calls Spawnfaze1, and Spawnfaze1 calls CaptureNext1.
This creates a loop in which the CM will constantly check which team has control of the point. Based on this, it will move the spawns around. Either to the first part of the map or the second.
CaptureNext2 and Spawnfaze2 follow this same process, the only difference, is Spawnfaze1 is deactivated. This is to prevents the first phase spawns from being active while the third phase spawns are active.