If you haven't loaded up the pathtest map yet then go ahead and do so. It is a good map to learn most of the basics of the editor (and you dont risk accidentally messing up your vanilla modules).
First things first I would suggest pressing F6 once, F6 toggles enemy agro on and off. The pathtest map does have enemies on it and you can die while you are editing. While there is a godmode it is somewhat of a hassle to enable from what I have been able to find, so disabling agro works fine. Keep in mind that if you walk in melee distance most enemies will still hit you, however this is usually something you wont have to worry about as you can move the player wherever you like to keep him safe.
There are two edit modes plus in-game mode which all share some keys.Editor Keys: F3 - Selection Mode : F4 - Edit Mode
The first edit mode is a selection mode, you can turn it on by hitting F3. You will know its active because you will see two values in the upper left corner that show the X and Y values of where your mouse cursor is. Entering select mode will also disable the in game shadows that walls cast. Selection mode is used to edit the placement of in game objects and delete them.
The second mode is Edit Mode which you can access by hitting F4. Edit mode allows you to cycle through multiple modes. The Tab key will show the key bindings for the different modes in Edit Mode. All the edit modes will be covered more in depth later.Edit ModesSound Emitters
- Allows you to place soundsPaint Colors
- Allows you to adjust hue, saturation, and brightness of objects. It is used like a paintbrush.Place Objects
- Allows you to place predefined objects that are defined in the objects.lua folder. These include walls, decorations, floor clutter, hidden walls, etc. Doors can be found in the objects palette but they WILL NOT function if placed as objects.Place Holes
- "Holes" are the black teleglitch anomalies, you can draw them with the mouse in this mode.Paint BMP
- Allows you to "paint" the floor of the module by selecting textures from a bitmap in the gfx folder, by default it will appear solid black in game.Place Triggers
- A little more complicated than it sounds. Allows you to place and name object triggers for scripting. Also allows placement of switches, terminals and map markers by cycling with F5. I thought that you would be able to place working doors using these various tools, but it doesn't seem that you can.Pathfinder
- This tool is used to draw out polygons or vertices to mark pathing for enemy AI. You can build an entire level without pathfinding, but enemies that chase you will not know how to get around objects that are in their way.NOTE: Do not under any circumstance delete the player character, if you delete the player object the game crashes right away and will not save anything you have done!Editor Keys:
Arrow Keys - Move Camera
Left Click - Select (drag to box select)
Right Click - Hold to move selected objects
Middle Click - Hold and move mouse to rotate objects (not mousewheel up or down)
Tab - Switch camera between last free camera placement and player location (Select Mode). Show key shortcuts for current mode (Edit Mode)
Enter - Duplicate selected objects (objects duplicate on top of each other, most placeables will separate upon returning to game mode)
Space - Displays the palette for Object and BMP modes
1 - Select objects only from current selection
2 - Select BMPs only from current selection
3 - Select ALL (this key ends up being important)
4 - Move player character to cursor location (this is handy as well, just dont drop yourself in the black distortions!)
6 - Spawn testweapons.lua at 0,0... This spawns all of the items listed in the testweapons.lua in your lua folder at the origin point of the map, this is handy for testing purposes and to an extent level building.
F1 - Toggle Console
F4 - Edit Mode
F5 - FPS meter on/off - Cycle through place triggers types
F6 - Enemy Agro on/off
F7 - Save Selected to Module... This brings up a console prompt to save selected content to the modules file. If you do not press "3" to select all before saving then you will just save a blank level!
F11 - Show bounding boxes
F12 - Module Select Screen - Navigate with arrow keys, start typing a module name to narrow the list. When you switch modules it does not save the current module that you are working on, be sure to save your work if you are switching around.
C - Copy selection to copypaste.lua - Copying takes whatever you have selected and adds it to a separate module called copypaste.lua, it is overwritten every time you it "C"
V - Paste contents of copypaste.lua to cursor location
Q - Swap depth of selected objects (a little wonky, but allows you to change what object appears on top of another to an extent)
N/M - Cycle Edit Modes while in Edit Mode
Numpad 1 - Zoom out to Map Distance (only works in game mode, appears to flatten depth in editor mode)
Numpad 3 - Show current ammo counts
Numpad 4 - Show enemy agro borders
Numpad 5 - Toggle pathing overlay
Numpad 7 - Show player stats
Numpad 8 - Highlight Camera Angle Triggers
Numpad 9 - Show Realtime Pathing (you wont see anything if you have agro off)
Numpad 0 - Zoom camera in to a depth just slightly closer than regular play
Numpad -/+ - Zoom camera in and out (does not work in game mode)
Numpad / - Toggle Sound Emitters
Escape - Menu / return to game mode