Jan 182009

I’ve recently come across a game that I’m becoming quite a fan of.  CS2D is an overhead shooter that is modeled after the popular Counter Strike mod of Half Life.  Back in the day, I used to play the 3D mod of Half Life, but I have not played it recently.

I’m a big fan of this game because of its simple and fun game play.  If you have some non-hardcore gamers, they will probably get a kick out of the quick and addictive gameplay. It is also seamlessly cross platform with all of my Windows and Mac friends playing along too.  And it also has a simple to use map editor that allows the creative juices to flow.  This will be a brief tutorial on how to use triggers to create doors that open, and breakable glass.

Using the in game editor to make a map is a piece of cake.  Some of the more advanced stuff can be a bit tricky though.  I’m working on a map where the Counter Terriorists must escort a VIP from a brick residence to a boat anchored just off shore.  However, a group of Terrorists have found the location first, and are able to begin some fortifications of the ship with the goal of preventing the VIPs escape.  I wanted to make the building a little more realistic by adding a window, and a door or two.

  1. Create the map
  2. Place your floor terrain where you want the door to be
  3. Go to the Entity menu, (the bulb with the points coming out of it) and select ‘Func_DynWall’
  4. Place it, and edit the entry by right clicking or double clicking.
  5. Change the Tile/Frame # to the number of the tile that you want to appear when the door is closed.
  6. Give the DynWall a unique name
  7. Elsewhere on your map, you want to create the button to open the door. From the entity menu, place a ‘Trigger_Use’ entity and edit it.
  8. Select the button type, and where you want it to appear, and who should be allowed to use it.
  9. Then, for the Trigger box, type in the name of your door (if you have multiple doors opened by a single trigger, separate them with commas)

Once you test this map out, you should now have open-able and close-able doors.

To create breakable glass, do the following:

  1. Place some terrain that looks like a window
  2. Add an entity that is ‘Env_Breakable’
  3. Edit this entity, and give the wall/glass some health, and determine which material you want to make it of.

You can test the map, and you should now be able to break the glass and walk through it once it is broken.

I may post some other map tricks in the future.

NOTE: Bots don’t handle glass/doors well.  If the is no clear path between their start and their objective, they will not realize that doors/glass is a viable alternative and will NOT actually move.  Keep this in mind if designing offline maps.

Attachment: Bridge Test map for Fiid who commented below.