How to add Pain Zones

Prerequisites:
How to add water

Summary:
If you'd like to set up areas of your map which will poison, shock, burn, or irradiate the player or NPC's, you've come to the right place, you sick puppy. :)

Some of the basic concepts required for this tutorial were covered in the How to add water tutorial, so this page assumes at least some knowledge of what a sheet brush is and how to use the Add Special Brush button.  Please go through the water tutorial if you feel uncomfortable with either of those.

NOTE: There is an alternative to creating a Pain Zone, which may be more appropriate, depending on what you're doing.  If you need NPC's to move through your pain zone, it may be better to use a DamageTrigger.  For some reason, path nodes don't seem to work inside of a pain zone, but they will work along with a DamageTrigger.  DamageTrigger's are also a bit easier to set up.  The disadvantage is that you don't have as much control over the exact shape of the pain area, since a trigger is just based on a circular area.  See How to add a DamageTrigger for more information.

 

1. Make an area for the Pain Zone

First, you'll need to create an area in your map for the Pain Zone to be.  A room with one or two doorways (and no windows) will work well to get started.

 

2. Move/size sheet brushes and define the zone boundaries with Zone Portals

Change the red selection brush to a 2D sheet by pressing the Build a Sheet button: (bottom button in the third column). Right-click on it and select Sheet Properties. Make sure "X-Wall" or "Y-Wall" is selected if you have normal upright doorways, and enter size values that will exactly match the width and height of your doorway. (count grid squares if you have to) Now move the sheet brush so that it exactly covers your doorway.

Push the Special Brush button: (fifth button down in the third column).  Select "Zone Portal" from the drop-down list:

Hit "Add Special", and you should get a brand new green brush exactly covering your doorway.

Repeat this step for any openings in your room that lead to areas outside the Pain Zone.

 

3. Check zone boundaries

Now hit F8 and Rebuild Geometry.  If you've done Step 2 correctly, you will have a new zone.  On the Rebuilder window, you should see the Zones value increase (should be at least one higher).

In the 3D view, click the little arrow button to bring down the menu bar. (it looks like this: )  Select Zone/Portal View from the Mode menu.  You are now seeing the zones in your map color-coded.  In this example, this green hallway has been "zoned":

Make sure your Pain Zone is a different color from the room or rooms next to it.

 

4. Add and set up a ZoneInfo item

Expand Actor -> Info in the Class browser to get to the ZoneInfo item.  Add a ZoneInfo item somewhere inside of your Pain Zone.  This works just like a WaterZone item.  In fact, a WaterZone item is just a ZoneInfo item with its bWaterZone property set to true.

Pull up the ZoneInfo properties and expand the ZoneInfo category.  Set bPainZone to True and set the DamagePerSec value to a number.  The larger the number, the more damage the player or NPC will take per second.

As described in the SDK docs, to set up which type of damage to dish out, set the DamageType to one of these values: Shot, Exploded, TearGas, PoisonGas, HalonGas, Radiation, Flamed (catches player on fire), Burned, Shocked, NanoVirus, EMP, Drowned, or Stunned.  This will affect which damage icons appear on the player's HUD.  NOTE: it appears that NanoVirus was never implemented as it seems to have no effect.

At this point, your Pain Zone should be functional.

NOTE: Defining zone boundaries with Zone Portals, even if you don't add any ZoneInfo items to them is a good thing.  They help to optimize your map.

Here are some of the common DamageType values and the corresponding HUD icons that the player will see:

Shocked
EMP
Burned
PoisonGas
Drowned, HalonGas
Radiation

 

5. Add cosmetic effects (optional)

To be fair, you might want to provide the player some sort of audio and/or visual clue to go with your Pain Zone.  Sparks, lightning bolts, and/or electrical sound effects would be good things to include if you have DamageType set to Shocked, for example.  Many of the damage types go well with one or more ParticleGenerator's or ElectricityEmitter's.  If you want add one of those to your map, they are available under Actor -> Effects and Actor -> Effects -> LaserEmitter.

If you have your DamageType set to PoisonGas, you might set the ParticleGenerator -> particleTexture property to one of the properties in the Effects texture package, such as Gas_Poison or Gas_Poison_A.  I'll eventually do a separate tutorial on particle generators, but for now you can play with the settings or find some examples in the existing Deus Ex maps.

Rebuild your geometry with F8, save your level, and feel some pain!


Back to main page