Skip to main content

CS:S map making with Hammer editor

  • Valve's definitive guide is here.
  • A nice set of tutorials here.
  • Entity guide
  • Navigation point helper guide.

CT/T spawn
  1. Insert entities "info_player_counterterrorist" or "info_player_terrorist". 
  2. The number of entities you place is the max number of player spawn
  3. Valve suggests about 20 points per team 128 units apart
Placing lights
  • Do this in the end - debugging is harder with all those fancy lights
  • Make sure they are not recessed into ceilings/walls - use the 3D camera view to place light.
  • Do not name lights (if you do you should know what you are doing).
Buy Zones/Bomb plant zones
  1. Select tools/toolstrigger for texture, make a block with this texture where you want the buy zone. 
  2. Click "toEntity", select "func_buyzone" from the dropdown list. 
  3. Set the appropriate team name from the drop down.
For bomb zones, do the same first step, then select "func_bomb".  

Texture one face of a solid
  1. Press shift + A to bring up texture application tool 
  2. Select your texture and click on the surface you want textured
Making ramps
  1. Select the object
  2. Use the vertex tool to move the sides as needed
  1. Select entity
  2. Select prop_dynamic, prop_static or prop_physics depending on the model you want
  3. When you select the model verify on the "info" tab that it's type is the same as the entity.
  4. Mismatch between the model type and prop type will cause the model not to appear on the map
The way sounds work is that there are triggers (env_soundscape) that start the playing of a sound when a player gets within their radius and has line of sight with them. The sound then keeps playing for ever (for that player) until the player trips a different soundscape. The way to set up soundscapes, then, is to set them at doorways and other entrance/exits. 
  • soundscape descriptions
  • List of CS:S soundscapes 
  1. Only edit the mesh once you are done laying out the map
  2. Load the map in CS:S, go into spectate and bring up the console
  3. sv_cheats 1
  4. nav_edit 1 (to see the mesh)  
  5. Usually upstairs areas only connected by ladders/ramps/stairs will not be connected by the automatically generated mesh
  6. Go to the highest navigable point, point at a spot and type nav_make_walkable. A blue pyramid will appear
  7. Go to each ladder in turn, point to it and type nav_make_ladder
  8. Now type nav_generate to regenerate the mesh. The top walkable should propagate everywhere
  9. Sometimes some ledges may not be included in the jump calculations: you can forcibly join the ledge: point at the top part, type nav_mark, then point at the landing point and then type nav_connect.
  10. Type nav_save to save the mesh  
Follow instructions here.

Type your intro text into a text file. Name the text file as map_name.txt (map_name being your exact map name) and save it in the same directory as the map file.

Debugging tips
  • sv_cheats 1
  • mat_wireframe 1
  • cl_leveloverview 8 (or whatever scale factor works)
  • nav_edit 1 (To see nav meshes, helpful to see jumps etc.)
  • mat_fullbright 1 (To remove lighting and see everything) 
  • compile with "rad" set to "no" - faster compilation with no lightmaps
Misc stuff
  • Night Vision does not amplify red
  • Grouping lights lets you change their properties together


Popular posts from this blog

Python: Multiprocessing: passing multiple arguments to a function

Write a wrapper function to unpack the arguments before calling the real function. Lambda won't work, for some strange un-Pythonic reason.

import multiprocessing as mp def myfun(a,b): print a + b def mf_wrap(args): return myfun(*args) p = mp.Pool(4) fl = [(a,b) for a in range(3) for b in range(2)] #mf_wrap = lambda args: myfun(*args) -> this sucker, though more pythonic and compact, won't work, fl)

Flowing text in inkscape (Poster making)

You can flow text into arbitrary shapes in inkscape. (From a hint here).

You simply create a text box, type your text into it, create a frame with some drawing tool, select both the text box and the frame (click and shift) and then go to text->flow into frame.


The omnipresent anonymous asked:
Trying to enter sentence so that text forms the number three...any ideas?
The solution:
Type '3' using the text toolConvert to path using object->pathSize as necessaryRemove fillUngroupType in actual text in new text boxSelect the text and the '3' pathFlow the text

Running a task in a separate thread in a Tkinter app.

Use Queues to communicate between main thread and sub-threadUse wm_protocol/protocol to handle quit eventUse Event to pass a message to sub-threadimport Tkinter as tki, threading, Queue, time def thread(q, stop_event): """q is a Queue object, stop_event is an Event. stop_event from """ while(not stop_event.is_set()): if q.empty(): q.put(time.strftime('%H:%M:%S')) class App(object): def __init__(self): self.root = tki.Tk() = tki.Text(self.root, undo=True, width=10, height=1)'left') self.queue = Queue.Queue(maxsize=1) self.poll_thread_stop_event = threading.Event() self.poll_thread = threading.Thread(target=thread, name='Thread', args=(self.queue,self.poll_thread_stop_event)) self.poll_thread.start() self.poll_interval = 250 self.poll() self.root.wm_protocol("WM_DELETE…