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.
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.
momentary_rot_button #1 and momentary_door #1
These are the X control devices. Set the Name
) of the button to
. This will be used for reference later by the func_mortar_field. Set the Targeted Object
. Set the Name
) of the momentary_door to
as well. The rest of the button's properties and flags should be setup as you normally would. The same goes for the door, except that you should set the Lip
) to a value equal to the distance it should travel. As shown in the picture above, the example map uses an air strike table
units wide. Finally, set the angle of the momentary_door to point in the direction opposite to the direction you want the door to move.
momentary_rot_button #2 and momentary_door #2
These should be setup the same as above, replacing
. If the air strike table is square, the same Lip
) value for the momentary_door can also probably be used.
Note: Something I've noticed is that using negative rotation values for the buttons may cause unexpected results with the momentary_door movement. If you're experiencing something strange, you may want to look in that area.
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
. This is what the func_button will target. The Spread Radius
) determines the mortar strike's accuracy. The value is the number of units of variance from a direct hit. The Repeat Count
) value is equal to the number of bombs that will be dropped. One is pretty devastating, so more is better!
) value determines how the func_mortarfield will be controlled. For this example, you want to have selected the
. Last, you have to specify the X Controller
) and Y Controller
). For this example, you'll want to use the values
, respectively, which correspond to the Name
) 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
) of the button to
. 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.
For a more concrete illustration, check out the example map linked below.