Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to timadam, our newest member!
Introduction This tutorial will lead you through the creation of an air strike table. What's an air strike table? you ask? It will allow you to target a specific point in your level and send an airstrike raining down on the targetted position. Setup The air strike is setup in four parts - a set of momentary_rot_button entities (part 1) that control a set momentary_door entities (part 2) that determine the position the func_mortar_field (part 3) will strike at when the func_button (part 4) is pressed. The entities are shown in the picture below (taken from Worldcraft's 3D view).
momentary_rot_buttons and momentary_doors These two sets of entities act as the positioning devices for the air strike. The momentary_rot_buttons act as controllers to move the momentary_doors around and the momentary doors act as the actual position indicators for the strike. In the picture above, momentary_rot_button #1 is the X controller, and momentary_door #1 is the X position indicator. Likewise, momentary_rot_door #2 is the Y controller, and momentary_door #2 is the Y position indicator.
func_mortar_field and func_button The func_mortar_field is where the mortars actually drop from. It must be triggered to drop the bombs, which is where the func_button comes in. The func_mortarfield is quite simple to setup. First, set its Name (targetname) to mortar. This is what the func_button will target. The Spread Radius (m_flSpread) determines the mortar strike's accuracy. The value is the number of units of variance from a direct hit. The Repeat Count (m_iCount) value is equal to the number of bombs that will be dropped. One is pretty devastating, so more is better! :) The Targeting (m_fControl) value determines how the func_mortarfield will be controlled. For this example, you want to have selected the Table (2). Last, you have to specify the X Controller (m_iszXController) and Y Controller (m_iszYController). For this example, you'll want to use the values xcontroller and ycontroller, respectively, which correspond to the Name (targetname) values of the X and Y controller momentary_rot_buttons) Finally, you need to setup a trigger to activate the func_mortar_field. In this example, we're using a func_button, but anything capable of triggering an event can be used. Simply set the Targeted Object (target) of the button to mortar. Setup any other properties/flags as you normally would. Now, when the button is pushed, the air strike is triggered and bombs are dropped at the position indicated on the table. A lot of this information will be more easily understood if you can examine the example map as you're going through it. Example For a more concrete illustration, check out the example map linked below. |