NWI Mapping Gameplay Setup Guide

From Valve Developer Community
Jump to: navigation, search

This article will detail the requirements of NWI's game logic, including the spawn zone and control point system for gamemodes that utilize them via map script. The process of creating these is the same for both Insurgency and Day of Infamy. This article will assume you already have knowledge mapping for the Source Engine.

Spawn Zones

Spawn zones consist of 2 entities, a ins_spawnzone brush entity and one or more ins_spawnpoint point entities. ins_spawnpoints must be placed at least 8 units away from surfaces nearby or they won't be seen by the spawn zone as valid spawn points. You can also set the World Model keyvalue to a model that represents the team this spawn point is for or set it to models/editor/playerstart.mdl (note that this has no effect in-game, its just for in-editor representation).


The ins_spawnzone must be created so that it encompasses the ins_spawnpoints. Spawn points within the ins_spawnzone's brush volume will be used for spawning when the spawn zone is active. It will need to be textured with a trigger tool texture (recommending tools/toolstrigger_spawnzone). You will need to give the spawn zone a name so that it may be used in the map script.


The Team Number (int) keyvalue must be set to the team you want to spawn on both the ins_spawnpoint(s) and the ins_spawnzone.

Note.pngNote:In Day of Infamy, team Security represents TEAM_ONE and team Insurgents represents TEAM_TWO.


Checklist

In short, a valid spawn zone that can be utilized by the game must pass the checklist below.

ins_spawnpoint(s) are at least 8 units away from surfaces nearby
The ins_spawnzone brush encompasses the ins_spawnpoint(s) you want it to utilize
Both the ins_spawnpoint(s) and the ins_spawnzone have matching Team Number (int) keyvalues
The ins_spawnzone is named

Control Points

Control points consist of 2 entities, a trigger_capture_zone brush entity or destructible point entity and a point_controlpoint point entity. point_controlpoint requires very little setup, all you need to do is name it and optionally give it a print name using the Print Name keyvalue (print names show up when a player captures the control point).


You then either create a destructible entity or a capture zone that associates with the point_controlpoint.

Capture Zone

Create a trigger_capture_zone brush entity, and then set the Associated Control Point keyvalue to the name of the control point you created.

Destructible

Note.pngNote:The destructible entity route is better created in the map script then in the map! See Mapscript Overview.

Multiple entities provided by Insurgency and Day of Infamy can be created to associate with the control point. You will need to make one of the following point entities:

In Hammer, all destructible entities are missing keyvalues. Most importantly some are missing the Associated Control Point keyvalue. If it's missing you will need to add the keyvalue manually by turning SmartEdit off and adding a key named controlpoint with the value being the name of the control point you want associated with the destructible.

Checklist

In short, a valid control point that can be utilized by the game must pass the checklist below.

The point_controlpoint must have a unique name
The trigger_capture_zone or destructible entity must have it's Associated Control Point (controlpoint) keyvalue set to the name of a point_controlpoint

View Points

ins_viewpoints should be scatter around for spectators. At least one should be in the map or otherwise the game will spam a error message about it.