In this article we will talk about how an airstrike works on the de_torn map. Don't you know that there is an airstrike on de_torn? Then hurry up and read about it in the "Secrets" section. To create such an airstrike, we will need the following entity objects:
This is what an airstrike would look like:

The airstrike action plan will be as follows:

The airstrike action plan will be as follows:
- The player passes through trigger_multiple located on the bridge
- Trigger_multiple activates multi_manager
- Multi_manager activates all objects that create the airstrike effect
1. Trigger_multiple
So, let's start by creating a trigger_multiple object. We will place it in the middle of the bridge (see figure below). When the player passes through this trigger, the multi_manager located just above will be activated.
Trigger_multiple (activates the multi_manager object)
Target: jet_multi (here we wrote the name of multi_manager)
Delay before trigger: 5 (time before object activation, in seconds)
Delay before reset: 360 (time during which the trigger cannot be activated again)
Delay before trigger: 5 (time before object activation, in seconds)
Delay before reset: 360 (time during which the trigger cannot be activated again)
2. Multi_manager
Multi_manager, as can be seen from the diagram presented above, activates 4 objects: first the sound of the plane, then it starts the plane itself, after that it "starts" shaking the ground and, in the end, it "blows up" the destructible boxes.The multi_manager properties look like this:
"Targetname" with the "Smart Edit" button pressed means the name of the multi_manager object, i.e.
jet_multi
. Below the name we see jet_sound sound activation after 0.1 sec, jet activation after 1.0 sec, jet_shake shake activation after 1.0 sec and jet_crate crate explosion activation after 1.9 sec. The activation time of all these objects is calculated taking into account the speed of the aircraft (after all, it is necessary to explode the boxes when the aircraft flies over them).3. Airplane sound Ambient_generic
The very first object activated after 0.1 seconds is the sound of an airplane. Naturally, this will be an ambient_generic object. This is what its properties and flags look like:
Ambient_generic (airplane sound)
Name: jet_sound (sound name)
Path: ambience/jetflyby1.wav (path to sound, this is the standard airplane sound)
Volume: 10 (sound volume, maximum)
Flags:
Play Everywhere: play all over the map
Start Silent: at the beginning of the round the sound is silent
Not Toggled: plays 1 time (then it must be activated again)
Path: ambience/jetflyby1.wav (path to sound, this is the standard airplane sound)
Volume: 10 (sound volume, maximum)
Flags:
Play Everywhere: play all over the map
Start Silent: at the beginning of the round the sound is silent
Not Toggled: plays 1 time (then it must be activated again)
4. Launching the plane Func_door
For an experienced mapper, entity objects are nothing more than just objects that have a certain set of properties. Indeed, you shouldn't think that the func_door object can only be a door based on its name. If we paint the door with suitable textures and place it horizontally, we can very well get a platform or a simple elevator.So in our case, the door will perform a function different from its direct purpose - it will be an airplane :) In our test map, we used airplane textures from the de_torn map.
In the picture below you can see that our plane will be a flat rectangular brush (and subsequently a func_door object), rotated at an angle of 45° in the direction of its movement.

Having painted the brush with an airplane texture, unfold it in the top view (2D-top). We recommend using flat values: 30°, 45°, 60°, etc.
Turn the brush into a func_door object and set the "Angle" parameter to exactly the same angle that the plane was turned to. In our case, the plane is rotated at an angle of 45°, which is why we specified 45° in the "Angle" parameter. It is also important to set the parameter Delay before close: -1, so that the plane can fly only once per round, i.e. Having reached the end point, he will remain there until the end of the round.
To make the blue parts of the texture transparent in the game, you need to set the following modes:
Render Mode: Solid, FX Amount: 255.
The next important parameter of the aircraft (func_door) is "Lip", which determines the distance the aircraft will move. By default, the plane will move a distance equal to its length (width). The distance when using the "Lip" parameter is calculated as follows: distance = plane length - Lip.
The distance is determined in the 2D top view. Since the angle at which our plane flies is 45°, the distance can be easily calculated along the diagonal of the coordinate grid. If our grid is divided into squares of 128x128 units, then according to the Pythagorean theorem (you remember it? :) the length of the diagonal is equal to ~180 units. As you of course understand, the Pythagorean theorem applies to any right triangle, regardless of whether legs A and B are the same or not.
We count the number of squares with a size of 128x128 units from the initial to the final position of the aircraft. We got 9 squares, which means the distance is ~1600 units. That is why we wrote the value "-1600" ("minus") into the "Lip" parameter, since a negative value increases the flight distance. Indeed, in the formula: distance = plane length - Lip there is a minus in front of the "Lip" parameter, and a minus on a minus gives a plus).
Func_door (aircraft)
Angle: 45° (aircraft flight direction, determined from the 2D top view)
Name: jet (aircraft name)
Render mode: Solid (together with fx amount: 255 makes the blue parts of the plane transparent)
FX Amount: 255
Speed: 1600 (aircraft speed)
Lip: -1600 (additional distance the plane flies; the value has nothing to do with speed, the numbers just match)
Wait before close: -1 (stays at the end point until the end of the round, then returns to its place)
Name: jet (aircraft name)
Render mode: Solid (together with fx amount: 255 makes the blue parts of the plane transparent)
FX Amount: 255
Speed: 1600 (aircraft speed)
Lip: -1600 (additional distance the plane flies; the value has nothing to do with speed, the numbers just match)
Wait before close: -1 (stays at the end point until the end of the round, then returns to its place)
5. Shake Env_shake
This special effect is not present on the de_torn map, but we decided to slightly enhance the perception of a low-flying jet, so we added a small earthquake using an object env_shake.Env_shake (object that causes the map to shake)
Name: jet_shake
Amplitude 0-16: 2 (oscillation amplitude, small)
Duration (seconds): 3 (shake duration in seconds)
0.1 jerk, 255.0 = rumble: 2 (shock frequency; the higher the value, the more often it shakes)
Flags:
GlobalShake: earthquake affects the entire map
Amplitude 0-16: 2 (oscillation amplitude, small)
Duration (seconds): 3 (shake duration in seconds)
0.1 jerk, 255.0 = rumble: 2 (shock frequency; the higher the value, the more often it shakes)
Flags:
GlobalShake: earthquake affects the entire map
6. Explosion of boxes Func_breakable
Near the final point of the plane's flight, we will create several boxes and turn them into func_breakable. On de_torn, instead of boxes, the roof of one of the houses is used. The plane flies over the roof - there is an explosion and part of the roof is destroyed.The activation time of func_breakable crates is calculated taking into account the speed of the aircraft and the distance it is from the crates at the beginning of the round. Oh, by the way, if you don't know, func_breakable objects are destroyed when activated, and by setting the "Explode magnitude" value we add an explosion of a certain force to the simple destruction. Outwardly, everything looks as if a plane dropped bombs on the boxes.
Func_breakable (exploding boxes)
Strenght: 1 (strength, can be left as default)
Material type: Wood (material type, wood)
Explode magnitude: 170 (explosion force, quite large)
Flags:
Only Trigger: explodes only upon activation (the player cannot destroy the boxes)
Material type: Wood (material type, wood)
Explode magnitude: 170 (explosion force, quite large)
Flags:
Only Trigger: explodes only upon activation (the player cannot destroy the boxes)
Conclusion
When creating an airplane, it is advisable to place it so that it is not visible from the ground, otherwise it may turn out that the airplane will hang motionless over some house and wait to be "called" :) On our map, the airplane is located very low above the mountains, so it is invisible from the ground. The player thinks that the plane is taking off from behind the mountains.It is also necessary to take into account the following feature of the func_door object (airplane): at the beginning of the next round, func_door always returns to its original position, i.e. You can see the plane flying backwards to its starting position. Knowing this feature, do not place the players' birthplaces under the plane's flight path if you do not want them to see this rather strange maneuver :)
torn_airplane.zip [193Kb] - in the archive there is an example map in BSP and RMF formats.



It can be seen from the figure that the fan rotation axis specified by the ORIGIN brush coincides with the X axis. Therefore, it is necessary to note in the flags X Axis.
Start On — so that the fan automatically starts spinning at the beginning of the round.




So, what needs to be written in the properties:




As can be seen from the diagram, multi_manager
turns on the light bulbs (they are located almost throughout the map, but are turned off at the beginning of the round). When they turn on, they create the effect of a bright flash of lightning. At the same moment the lightning itself turns on (object
env_laser).



In this case, the bomb falls through the water and touches the ground, this is enough for it to explode.




We do the same with the second group of brushes. And now both groups intersect perfectly at an angle of 45° and you don't need to adjust anything with the tool to work with vertices!
As a result, both groups in the top view should look like this:
And this is how the intersection now looks in 3D view:



Now let's see how this is implemented in the editor.









And now about how the bird works. This animal will be our object
func_tracktrain, which will constantly move around objects
path_track. These
path_track, as is known, determine the trajectory of movement for
func_tracktrain.
The top view clearly shows how the ORIGIN brush is placed:
Next, select the bird along with the ORIGIN brush and turn it into an object
func_tracktrain.


So, select all the brushes that make up the bridge (these are both boards and ropes) and the ORIGIN brush, and turn them into func_pendulum
. Now everything that is selected (see the figure below) will rotate (swing) around the ORIGIN brush.

Let's assume that someone scored a frag. In this case, the following chain of actions arises:













The same operations occur when you press the second and third buttons. The only difference is in the melodies that are played and muted. Thus, we need to create:
In order not to get confused in the numerous properties of the objects given below, use the diagram.
So, now when we press, for example, the first button, the first one is activated
multi_manager
, which already activates 4 objects: turns on the first melody, mutes the second melody, mutes the third melody, changes the "Target" of the door to the value multi_1. When you press other buttons, similar operations occur.












In order not to rotate the wings in the editor in order to apply the second picture, we suggest temporarily moving them, as shown in the same diagram, but a little lower. As soon as the flaps are transferred, we apply the second picture (see figure below), selecting all sides of the flaps, clicking the "Tread as one" checkbox and the "Fit" button.