COUNTER-MAP:  Counter-Strike Mapping
Visit us on IRC at gamesnet.net, #countermap
Pic of the Week
Poll
Map Spotlight
Weekly Playtests
Random Map Idea
In the News
About Counter-Map
The Crew
Mapping Forums
Important Links

Submit

Tutorials

Mapster
Nemesis' Utilities
Map Packs
Texture Packs
Mapping Utilities
File Database
EditLife.net
 

 Back to Tutorials Page   Other Tutorials by FatboyTim 

Changing the map layout between rounds!
By FatboyTim  Last changed Jan 24 2001

Usefulness of content:  161 users  
 out of 5
 4.6 out of 5

This tutorial is designed to show you how to create a map which changes it's layout from round to round. It is meant for advanced mappers and I will be assuming that you are familiar with common entities and normal mapping terms. I will also assume you are familiar with the most common method of resetting entities at the beginning of every round. If not, please first read Lacos's tutorial here.

For this tutorial we will be using the following entities:

func_door
multi_manager
trigger_relay
trigger_changetarget

Now if you are reading this, you should already know that a func_door placed outside your level can be used to reset entities at the beginning of every round. The best way to do this is to have it target a multi_manager which in turn targets trigger_relays which can be set to turn specific entities ON or OFF.

What we can do next is extend this technique through use of the trigger_changetarget entity.

For this demonstration we will use a number of crates(!) which we will create with the func_wall_toggle entity. The func_wall_toggle is almost the same as a func_wall entity, except that triggering it makes it appear or disappear. Its flag properties control its starting state.

Step 1
Create your basic level layout. Light it and texture it as you would normally.


(picture of empty map)

Step 2
Using a func_wall_toggle create a crate. Give it the following properties:

   Name: round_1_item
   (Flag)starts_invisible: [X] (checked)

Step 3
Copy your crate, and paste this copy to a different place in your level. Edit the properties of the crate like so:

   name: round_2_item.
   (Flag)starts invisible: [X]

Step 4
Copy your crate again, and paste this copy to yet another different place in your level. Edit the properties of the crate like so:

   name: round_3_item.
   (Flag)starts invisible: [X]


(Our 3 new crates)

Step 5
Place a func_door (brush based entity) somewhere outside your map. Give it the following properties:

   name: round_resetter
   target: round_reset_1

Step 6
Place a multi_manager (point entity) somewhere in your map. Turn smartedit off and give it the following keys/values:

   name: round_reset_1
   round_1_on: 0.5
   round_3_off: 1.0
   newround_1: 1.5
(You can create these new keys and values by clicking off "SmartEdit" and the clicking "add")


(Multi_manager 'round_reset_1' keys/values.)

Step 7
Create a trigger_relay entity. This one will turn the first crate (func_wall_toggle) ON when called.

   name: round_1_on
   target: round_1_item
   triggerstate: 1 (on)

Step 8
Create another trigger_relay entity. This one will turn the first crate OFF when called.

   name: round_1_off
   target: round_1_item
   triggerstate: 0 (off)

Step 9
Create a trigger_changetarget. When this is called, the named entity (in this case our func_door) it will cause it to target a new named entity (in this case, our second-round multi_manager).

   name: newround_1
   target: round_resetter
   new target: round_reset_2

Step 10
Okay now that we have created our conditions for round 1, we need to set up rounds 2 and 3. To do this, we copy the enties we created in steps 6 though 10 and paste them *twice* before editing the keys as follows: (Round 2) multi_manager

   name: round_reset_2
   round_2_on: 0.5
   round_1_off: 1.0
   newround_2: 1.5

trigger_relay

   name: round_2_on
   target: round_2_item
   triggerstate: 1 (on)

trigger_relay

   name: round_2_off
   target: round_2_item
   triggerstate: 0 (off)

trigger_changetarget

   name: newround_2
   target: round_resetter
   new target: round_reset_3
 

(Round 3) multi_manager

   name: round_reset_3
   round_3_on: 0.5
   round_2_off: 1.0
   newround_3: 1.5

trigger_relay

   name: round_3_on
   target: round_3_item
   triggerstate: 1 (on)

trigger_relay

   name: round_3_off
   target: round_3_item
   triggerstate: 0 (off)

trigger_changetarget

   name: newround_3
   target: round_resetter
   new target: round_reset_1

Span 11
Compile and run your map!

   name: round_3_item.
   (Flag)starts invisible: [X]


top-left: map start. Top-right: round 1 - a crate appears. Bottom-left: round 2 - has that crate moved? Bottom right: round 3 - it's moved again!)

Download the examples
You can download 3 versions of this file from here. Get the  MAP, RMF, and BSP versions  in this zip file.

Results
You should now have a map in which a crate appears to be placed in a different position from round to round. Of course, you can use this technique for more than just placing crates!

Other examples which could be useful might be lights, ambient_generic(s), func_wall_toggle 'fences' which might change the whole layout of the map, func_illusionarys etc. Of course you can also extend the 'cycle' to more than three rounds, and by offsetting which round's entities are turned on and off you couls have items on for 3 rounds and then off for two rounds before looping (for example.)

Finally, in a real twist of ingenuity you *could* try giving multiple goals to a map and having them 'cycle' too. For example, a bomb-site and a room containing hostages could each be blocked off alternately. This would mean that on some rounds the map would be a defusion level and on others a hostage-rescue!

Anyway, I hope this has been helpful,

--FatboyTim :-) (tim_ford@email.com)

PS. The map file here contains all of the entity data needed to get a basic '3-way cycle' going. Simply copy and paste the small room just outside the map and name all of your cycling items either round_1_item, round_2_item or round_3_item. Remember that any items which are set to cycle should start off/invisible/silent etc. Otherwise on the early rounds of the map they will *all* be switched on!

 Back to Tutorials Page   Other Tutorials by FatboyTim 

 Rate this tutorial for us! 
 Poor   1  2  3  4  5  Excellent
 Usefulness of Content  

Get Hammer level editor, the most commonly used editor for CS and HL levels.
- - - - - - - - - - - -

Get Zoner's Half-Life Compile Tools, the premier compiling tools for CS maps.
- - - - - - - - - - - -

Get the "experts" Hammer configuration for CS mappers to utilize advanced custom CS entities.
- - - - - - - - - - - -

An improved CS:S entity definition file, to allow CS:S mappers to use all entities and options.
- - - - - - - - - - - -