Creating a Wingman Map

From Valve Developer Community
Jump to: navigation, search
English Русский
Counter-Strike: Global Offensive Level Creation
Csgo icon wingman.png

Wingman (internally: scrimcomp2v2) is a game mode in Counter-Strike: Global Offensive Counter-Strike: Global Offensive .

Here, you can learn how to modify a competitive map for it, and how all of this works.

A map is launched in the Wingman game mode with the commands game_type 0, game_mode 2 and map <mapname>, or all in one: map <mapname> scrimcomp2v2.

Game Mode Description

Pivotal (CFG) differences
Property Competitive Wingman
Players per team 5 2
Best of 30 16
Roundtime in minutes 1:55 1:30
Freezetime in seconds 15 10
Max Money $16000 $8000

Technically, this game mode is almost equal to the Competitive game mode. The round ending events are equal, meaning that this game mode can be played with bomb sites, hostages or none of them.

The crucial differences are the game mode's CFG file (see CS:GO Game Mode Commands) and maxplayers.

Officially, the game mode plays as follows:

  • Two teams of two players play a match in a competitive environment.
  • There is one accessible bombsite.

Adding Wingman Support to a Map

Any competitive map can be modified to support Wingman in the same way as Cobblestone, Inferno, Overpass, Vertigo, Nuke and Train. If these maps are launched in Wingman, the spawnpoints and buyzones are shifted if needed and there are blockers that limit the playable area to only one bombsite.

If you are designing your map to only work with Wingman, then you probably don't need this tutorial. This tutorial is for the case that you already have (or are planning to create) a map for one of the Classic game modes that shall also support the Wingman mode.

Used Entities


Our map must detect the current game mode and check if it is Wingman; To do that, we must use VScripting. Fortunately, Valve has already made a VScript that does that and made it available to any map, so you don't have to write any code.

// This function is called from the map OnMapSpawn

function EnableWingman()
       // checks the game mode and type and the current match
       local nMode = ScriptGetGameMode();
       local nType = ScriptGetGameType();

       // type 0, mode 0 = casual
       // type 0, mode 1 = competitive
       // type 1, mode 0 = arms race
       // type 1, mode 1 = demolition
       // type 1, mode 2 = deathmatch
       // etc 

	if (nMode == 2 && nType == 0)								// if we are running 2v2, do stuff
	  EntFire("spawnpoints.standard", "SetDisabled", 0, 0);
	  EntFire("spawnpoints.2v2", "SetEnabled", 0, 0);
	  EntFire("brush.blocker", "Enable", 0, 0);
	  EntFire("buyzone.2v2", "SetEnabled", 0, 0);
	  EntFire("navblocker.2v2", "BlockNav", 0, 0);
	  EntFire("buyzone.2v2", "Disable", 0, 0);				// disable 2v2 buyzones
	  EntFire("navblocker.2v2", "UnblockNav", 0, 0);

To run that script, create a logic_script entity in your map, and call it script.2v2. Set the Entity Scripts property to 2v2/2v2_enable.nut. Then make a logic_auto and in the Outputs tab, create an output to OnMapSpawn with the target entity script.2v2, via the output RunScriptCode, with the parameter of EnableWingman().

This will change the entities in our level depending on the game mode we are on. Because of that, all of the following entity names are required to be exactly as listed here, otherwise it will not work.

Spawn points and Buyzones

Here, we set the custom spawn points. But before that, select all of the normal spawn points (both CT and T) that are going to be used in the normal Classic mode. Change their names to spawnpoints.standard. The script will deactivate these in Wingman, otherwise enable them.

Now, create at least two spawn points for each team that should be used in Wingman. In the official Valve maps, they use 4 for each team. Select them all, name them spawnpoints.2v2 and set Enable by default? to No.

If these spawns are not already inside of a buyzone, just create another one for them, select the team and name it buyzone.2v2. Do the same for the other team. The standard buyzone will not be disabled by the script in Wingman, as it is either outside the playable area or unable to affect gameplay.

Blocking the Playable Area

The tools/wrongway tool texture is only visible to players close to the origin of the entity that this material is applied to.

The game can work as it is now, but you will probably want only one bombsite to be reachable. The way to do this is by adding physical blockers in every hallway that leads to the other bombsite to block players from going there. To do that, create some brushes in the places that you don't want the player to go with the tools/toolsclip texture. Convert them to func_brushes and name them brush.blocker. Set Start disabled to Yes and the script will enable them only in Wingman.

You can even use the cool tools/wrongway texture on that to signalize to players that they can't go through that invisible wall. It even fades out with distance!

Anyway, if you do everything right, it should be working.

Blocking Navigation Meshes

You should use func_nav_blocker entities to stop bots from trying to walk through the blockers in Wingman. To do this, create brushes with the tools/toolstrigger texture. Then convert it to a func_nav_blocker entity and name it navblocker.2v2. The VScript will finally fire BlockNav to these entities in Wingman or UnblockNav in all other game modes.

Testing and Uploading

To play a map in Wingman mode, type in the commands game_type 0 and game_mode 2 into the console and then enter the map command to access your map.

When you upload the map to the workshop, be sure to select "Wingman" in the list of game modes so that people can select that when they open the map through the in-game workshop tab. Done!