This article is a stub. You can help by adding to it.
This article is a work in progress. Info on node editing will be added.
wc_update_entity console commands can be used to update entity data while running a map in the engine, then sending the changes to Hammer to commit the changes to the .VMF file. It is commonly used to change node positions or to update physics props after they have done their initial settling.
map_edit <mapname> command is used to load a .BSP for editing. This command creates a connection between the engine and the Hammer editor so that data can be transferred. Before using
map_edit, you must compile the map with the current version of the associated .VMF, then load the map in Hammer. The map versions of the .BSP and the .VMF must match exactly. If they do not match, no editing is possible.
Once a map is loaded with
wc_update_entity <entity name> command is used to send the updated position and angles for the named entities back to the Hammer editor. When using
wc_update_entity, you can uses the targetname of a single entity to update, or use an entity classname (i.e. prop_physics) to update all entities in the map of that type. Every time
wc_update_entity is invoked, the position and angle of the entities is sent to the editor.
Note: Only the position and angle of point entities can be updated in this way. Solid entities and other brushes cannot be modified using
wc_update_entity. See Introduction to Editing for a description of entity types.
Editing node graphs
Settling physics props
You can use the
map_edit command to update your .VMF with the positions of physics props after they've been settled into their final position by the game's physics system. This saves valuable CPU cycles at the start of the map, as well as preventing props from visually "dropping" into place when the map is loaded or a new round begins (in a multiplayer game).
map_edit to update the position of prop_physics_multiplayer entities:
- Do a full compile of the map you wish to edit.
- Load the map in Hammer. *Do not make any changes or save the map, or the edit will fail!*
- Minimize Hammer.
- Start the game (windowed mode works best).
- At the console, type
map_edit <map name>and the map will load.
- After the map loads, wait a few moments for the physics props to settle.
- Open the console and type
quitto exit the game.
- Switch back over to Hammer. The locations of the physics props should be updated.
- Check the results, then save your changes to the map.
- Recompile the map, and the physics props will start in the "settled" positions.
You should now be able to safely mark many of the props as "Start Asleep". This will provide additional performance savings because no physics calculation will occur for the prop until it is acted upon by a physics force that would move it.
Other uses of map_edit
- Follow the same process to update other entity types, such as prop_physics. Simply use the syntax
wc_update_entity <entity name>for each entity you wish to update in the map. Only the position and angle of point entities can be updated.
- Using map_edit to place debris models