Basic Triggers
This tutorial was originally posted by FG_28 Kodiak on the 1c forums. FG28_Elatan translated the German into English.
I simply copied it in its entirety to here :)
In the old IL-2 1946, one can control the success of the mission with the help of the target object. The options are destroy, destroy ground, destroy bridge, recon, escort, defence, defence ground and defence bridge. Additionaly, it is possible to set a time limit, to make the target a primary, secondary or a hidden objective.
In IL-2 Cliffs of Dover, target objects (as in il21946) are replaced by triggers. However, the ambitious mission builder will soon realise that, without scripting abilities, one can only spawn aircrafts. The aim of the next lessons will be to achieve the same as in 1946 with the help of scripts.
In this lesson let's first take a look at the possibilities of Cliffs of Dover without scripting.
We start the full mission builder and make some preparations.
At first, we place a "observer plane" at an airfield, which can be manned by a player. It's only use is to observe the passing of the events.
Now, place a group of Bf110s on the map, which are supposed to spawn later by means of the trigger. It's very important to select "Script Spawn C", because otherwise the Bf110s spawn at the beginning of the mission and a second time when the trigger is activated.
After this, we call up the script and trigger menu.
Under trigger, we set up a new one by clicking ADD.
At first we change the name TRIGGER into something more useful like BF110 spawn
Now we have the option to select the type of the trigger. At the moment, Cliffs of Dover supports 4 different types:
-TTime: This trigger is activated after a specified amount of time (set in seconds). However, CloDo isn't very precise with this.
-TGroupDestroyed: This one is activated, after a certain percentage of planes or vehicles (tanks, ships etc.) from a group have been destroyed.
-TGroundDestroyed: This one is activated, after a certain percentage of ground targets has been destroyed at the position XY with the radius R.
-TPassThrough: This trigger is activated twice. The first time, when something (player, AI-plane, ground units etc.) enters an area and the second time when it leaves the area.
-TTime: This trigger is activated after a specified amount of time (set in seconds). However, CloDo isn't very precise with this.
-TGroupDestroyed: This one is activated, after a certain percentage of planes or vehicles (tanks, ships etc.) from a group have been destroyed.
-TGroundDestroyed: This one is activated, after a certain percentage of ground targets has been destroyed at the position XY with the radius R.
-TPassThrough: This trigger is activated twice. The first time, when something (player, AI-plane, ground units etc.) enters an area and the second time when it leaves the area.
For the first test, let's choose TTime, as it is the simplest one, and set the time to 30 seconds.
After this, we choose "Actions" and also click "add". The name of the action has to be the same as the name of the trigger, i.e. Bf110Spawn. Without using scripts, this is the only way to activate the action with the help of a trigger. If the names aren't exactly the same, nothing happens. The only type of action available is ASpawnGroup, with which one can spawn planes. Sadly, the aren't any other actions in Cliffs of Dover.
Next, we click the little button.
Now we choose our Bf110 group with the appearing crosshair.
Afterwards, everthing needs to be saved.
Now we can start the mission.
At the beginning of the mission, we are a bit lonely.
But this changes after about 30 seconds.
Basicly, we achieved the same in this example as in IL-2 1946, by entering a different time at the starting waypoint. From this perspective, it is rather complicated to spawn planes in Cliffs of Dover after a certain amout of time. The advantage is, however, that one can also use the other trigger types. One can also spawn planes when a certain area is entered or one can send "reinforcements" if to many planes of a group have been destroyed etc.
But to exploit these advantages, one has to use scripts.
Basicly, we achieved the same in this example as in IL-2 1946, by entering a different time at the starting waypoint. From this perspective, it is rather complicated to spawn planes in Cliffs of Dover after a certain amout of time. The advantage is, however, that one can also use the other trigger types. One can also spawn planes when a certain area is entered or one can send "reinforcements" if to many planes of a group have been destroyed etc.
But to exploit these advantages, one has to use scripts.