Difference between revisions of "Triggers"
(→List of all Actions: Added more actions but some of them still have incomplete description) |
m (Added some descriptions for actions, and numerous grammar fixes/optimizations) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:CDK Mission Editor: Triggers}} | {{DISPLAYTITLE:CDK Mission Editor: Triggers}} | ||
− | Triggers are an integral part of anything but the most basic of User Missions. This article | + | Triggers are an integral part of anything but the most basic of User Missions. This article covers the basic operation of triggers and what each available component does. |
__TOC__ | __TOC__ | ||
==Overview== | ==Overview== | ||
− | Triggers are a feature of the Mission Editor which allow for vastly more complicated missions to | + | Triggers are a feature of the Mission Editor which allow for vastly more complicated missions to be created, they can be used for scripted events, as well as for enabling more advanced mission features such as capture points, spawn points, visible way-points, and much more. As well as being useful for making more advanced single-player missions an understanding of triggers is a necessity for creating multi-player user missions, as such missions require triggers to function. |
− | Triggers consist of three main components (also known as elements): Events, Conditions, and Actions. An event is what causes the trigger to | + | Triggers consist of three main components (also known as elements): Events, Conditions, and Actions. An event is what causes the trigger to execute, for example, the "periodicEvent" event will execute the trigger according to the specified interval (for example once a second, or once every 15 seconds). Once a trigger is executed a condition determines whether the trigger should continue to carry out the actions assigned to it, or should not do anything / carry out any else actions assigned to it; for example the "UnitInArea" condition will carry out the triggers actions if the specified unit is within the specified area at the moment the trigger is executed. Finally, actions define what the trigger does once it is executed and the condition is met; for example "playHint" displays a message on the user's screen and "unitDamage" can be used to damage part of, or destroy a unit. Actions can also be assigned as "elseActions" which instead of being carried out when the condition is met, will be carried out when the trigger is executed, but the condition is not met. If there are no elseActions then the trigger will do nothing when the condition is not met. Triggers can be assigned multiple events, conditions and actions. If a trigger is created with no conditions then it will carry out its actions whenever it is executed, this is useful for triggers which always need to run, for example, a trigger to draw various lines on the mini-map at the start of the mission. Be aware that if a trigger is created without conditions and "enableAfterComplete" is ticked then the trigger will run forever, repeatedly every time this event occurs (for a default trigger this means it would carry out its actions once a second, every second for the entirety of the mission, unless it is disabled by another trigger). |
==Creating Triggers== | ==Creating Triggers== | ||
Line 14: | Line 14: | ||
[[File:CDK Trigger_and_Objectives_Window.jpg|thumbnail|right|450px|The trigger window with a blank trigger (Trigger_01 selected), other triggers and categories are for demonstration purposes]] | [[File:CDK Trigger_and_Objectives_Window.jpg|thumbnail|right|450px|The trigger window with a blank trigger (Trigger_01 selected), other triggers and categories are for demonstration purposes]] | ||
− | In order to make a trigger you first need to display the trigger window in the mission editor, this can be done by clicking the "Properties and Triggers / Mission Obj. info" button (looks like [[File:CDK Open_Triggers_Window.jpg]]) on the mission editor bar at the top of the editor. This will open the "Triggers / Mission Obj. Info" window (from here on known as the "trigger window") at the right hand edge of your screen, this window is where you can edit triggers and mission objectives (for the time being it will be blank). Now in the properties window (where your mission settings are) scroll down until you reach the Triggers / Mission Ob. Navigation section and expand it if necessary. | + | In order to make a trigger you first need to display the trigger window in the mission editor, this can be done by clicking the "Properties and Triggers / Mission Obj. info" button (looks like [[File:CDK Open_Triggers_Window.jpg]]) on the mission editor bar at the top of the editor. This will open the "Triggers / Mission Obj. Info" window (from here on known as the "trigger window") at the right-hand edge of your screen, this window is where you can edit triggers and mission objectives (for the time being it will be blank). Now in the properties window (where your mission settings are) scroll down until you reach the Triggers / Mission Ob. Navigation section and expand it if necessary. |
− | This window is where all the triggers and objectives of your mission will be stored, organized under the (currently empty) "Triggers" and "Mission Objectives" folders. There are | + | This window is where all the triggers and objectives of your mission will be stored, organized under the (currently empty) "Triggers" and "Mission Objectives" folders. There are several buttons at the bottom of this section: |
'''Trigger''' This button will create a new trigger, either inside the root "Triggers" folder inside the currently selected category. | '''Trigger''' This button will create a new trigger, either inside the root "Triggers" folder inside the currently selected category. | ||
− | '''Category''' This button will create a new category, either inside the root "Triggers" folder inside the currently selected category. Categories are essentially folders for triggers, functionally they serve no purpose to the mission and exist | + | '''Category''' This button will create a new category, either inside the root "Triggers" folder inside the currently selected category. Categories are essentially folders for triggers, functionally they serve no purpose to the mission and exist to allow you to organise your triggers. Categories can be created inside other categories and form folder trees which can be collapsed to hide triggers not currently of interest (collapsing categories will not disable or remove their contents). If a category is disabled all of its contents (including stuff in subcategories) will be disabled. |
'''Mission Obj''' This button will create a mission objective in the "Mission Objectives" folder. Mission objectives are described in other guides. | '''Mission Obj''' This button will create a mission objective in the "Mission Objectives" folder. Mission objectives are described in other guides. | ||
− | '''Copy''' and '''Paste''' The Copy button will copy the selected trigger | + | '''Copy''' and '''Paste''' The Copy button will copy the selected trigger or mission objective. If a mission objective is selected and the copy button is pressed then a duplicate mission objective will be created. If a trigger is selected when the copy button is pressed then the Paste button will become available this allows you to select a different category for the trigger to be pasted into, once the destination is selected pressing the Paste button will create a duplicate of the copied trigger there. |
'''Del''' This button will delete the selected trigger or mission objective. | '''Del''' This button will delete the selected trigger or mission objective. | ||
− | '''Up''' and '''Down''' These buttons will move the selected trigger, category or mission objective up or down in the list, this | + | '''Up''' and '''Down''' These buttons will move the selected trigger, category or mission objective up or down in the list, this does not affect the behaviour of the mission and is used to keep the lists organised. |
− | + | To create your first trigger click the "Trigger" button, this will create your first trigger "Trigger_01" and display it in the trigger window. What you see will look similar to the image to the right (you will only have "Trigger_01" whereas the image has several other triggers, categories and objectives for demonstration purposes). At the top of the window is the triggers name, this can be changed to whatever you want (however should not be the same as any other triggers), it is best to pick a descriptive name such as "Setup" or "Teleport Player" to keep it clear what everything does, however, this is completely optional. The next option is an "Enabled" checkbox, by default, all triggers start enabled, disabling a trigger effectively prevents it from being executed. This is useful for triggers than you want to manually activate or execute at specific moments, as triggers can be enabled, disabled and even just executed without enabling it during the mission by other triggers. The next field is a comments box, this has no effect on the trigger's operation and is just for documenting what it does, it is completely optional. | |
Next is the trigger properties section this contains the following fields: | Next is the trigger properties section this contains the following fields: | ||
Line 36: | Line 36: | ||
'''actionsType''' By default this is set to "PERFORM_ONE_BY_ONE" meaning the actions will be completed in the order they are present in the actions list of the trigger. This option can be changed to "PERFORM_ALL" where all actions are completed at the same time. | '''actionsType''' By default this is set to "PERFORM_ONE_BY_ONE" meaning the actions will be completed in the order they are present in the actions list of the trigger. This option can be changed to "PERFORM_ALL" where all actions are completed at the same time. | ||
− | '''conditionsType''' By default this is set to "ALL", but can be changed to "ANY". For triggers with multiple conditions this determines whether all of the conditions need to be met | + | '''conditionsType''' By default this is set to "ALL", but can be changed to "ANY". For triggers with multiple conditions, this determines whether all of the conditions need to be met for the trigger to carry out its actions, or if any of the conditions being met is enough for the trigger to carry out its action(s). |
− | '''enableAfterComplete''' By default this is set unchecked, meaning that once the trigger has carried out its actions it becomes disabled | + | '''enableAfterComplete''' By default this is set unchecked, meaning that once the trigger has carried out its actions, it becomes disabled. If it is checked then the trigger will carry out its actions every time it is executed and the condition is met, instead of just the first time. |
Now we have reached the "Elements" section, and below it the "Element" section (Gaijin could have come up with better names) this is where you build your trigger; the "Elements" section is where you create the events, conditions, actions, and else actions of your trigger, while the "Element" section is where you modify the properties of each component. The elements area consists of a window with four folders where the contents of your trigger will be displayed, and underneath a collection of buttons: | Now we have reached the "Elements" section, and below it the "Element" section (Gaijin could have come up with better names) this is where you build your trigger; the "Elements" section is where you create the events, conditions, actions, and else actions of your trigger, while the "Element" section is where you modify the properties of each component. The elements area consists of a window with four folders where the contents of your trigger will be displayed, and underneath a collection of buttons: | ||
− | '''Event''', '''Condition''', '''Action''' and '''ElseAction''' These buttons will display a new window with a list | + | '''Event''', '''Condition''', '''Action''' and '''ElseAction''' These buttons will display a new window with a list of all the available events, conditions and actions, depending on what button is pressed (the Action and elseAction buttons display the same list of actions, but will insert them into either the Actions or ElseActions area. There is a search box which will find the first item matching the phrase entered, it will only return the first entry in the list however, there may be more matches further down. To insert a component, select it from the list and click "Ok". |
− | '''Up''' and '''Down''' These buttons will move the selected element up and down in the list. Changing the order of components only | + | '''Up''' and '''Down''' These buttons will move the selected element up and down in the list. Changing the order of components only affects the Actions and ElseActions area where the actions will be carried out in the order they appear in the list. If actionsType is set to "PERFORM_ONE_BY_ONE" (the default setting) in the trigger properties area. |
'''Delete''' This button will delete the selected trigger component. | '''Delete''' This button will delete the selected trigger component. | ||
− | '''Copy''' This will copy the selected trigger component, multiple components can be | + | '''Copy''' This will copy the selected trigger component, multiple components can be copied from different triggers (or the same one) without needing to press "Paste ..." each time. |
'''Paste ...''' This button will display a list of all the copied components (grouped by type) and allow you to select one to paste into the currently selected trigger. | '''Paste ...''' This button will display a list of all the copied components (grouped by type) and allow you to select one to paste into the currently selected trigger. | ||
Line 57: | Line 57: | ||
[[File:CDK Simple_Trigger_Demonstration.jpg|thumbnail|right|500px|The completed trigger and mission setup to Teleport a player]] | [[File:CDK Simple_Trigger_Demonstration.jpg|thumbnail|right|500px|The completed trigger and mission setup to Teleport a player]] | ||
− | In this example we are going to make a simple trigger which will teleport the player to a new location when the player enters a specific area. For this example the player unit will be in a tank (placed as "tankModels" in the editor) called "Player", there will be an area called "Teleport_Area" and another called "Destination_Area" (exact setup can be seen in the image to the right). When the player tank enters "Teleport_Area" we want it to be teleported to "Destination_Area". | + | In this example, we are going to make a simple trigger which will teleport the player to a new location when the player enters a specific area. For this example the player unit will be in a tank (placed as "tankModels" in the editor) called "Player", there will be an area called "Teleport_Area" and another called "Destination_Area" (exact setup can be seen in the image to the right). When the player tank enters "Teleport_Area" we want it to be teleported to "Destination_Area". |
To follow along with this example create a "tankModels" unit type, assign it as the player's vehicle, call it "Player" and set it to a tank you own. Create two box areas for the teleport and destination areas (called "Teleport_Area" and "Destination_Area"). If not already present from reading the previous section create a new trigger. | To follow along with this example create a "tankModels" unit type, assign it as the player's vehicle, call it "Player" and set it to a tank you own. Create two box areas for the teleport and destination areas (called "Teleport_Area" and "Destination_Area"). If not already present from reading the previous section create a new trigger. | ||
− | You should now have a fresh trigger (likely called Trigger_01 or similar), we will begin by renaming the trigger to something more descriptive so if we come back to the mission later it is nice and clear what it does; to do this select the name field, delete the old name and type a new name for the trigger, for example "Teleport Player". We will | + | You should now have a fresh trigger (likely called Trigger_01 or similar), we will begin by renaming the trigger to something more descriptive so if we come back to the mission later it is nice and clear what it does; to do this select the name field, delete the old name and type a new name for the trigger, for example "Teleport Player". We will leave most of the properties as default, however, we will tick "enableAfterComplete" as we want the player to be teleported every time they enter the area, not just the first time. We will then select the "periodicEvent" event and set its time field in the Element area to 0.1, this means the trigger will be executed and check if the player is in the area every 0.1 seconds. |
− | Next we will click the "Condition" button and look for the "unitWhenInArea" condition and insert it into the trigger, this condition allows us to check whether a chosen unit is within a specified area at the moment the trigger is executed. When the condition is added it should automatically become selected in the "Element" section, scroll down in the trigger window so that all of the settings can be seen. The "object" field is what the condition is going to act on, in our case we want to check the player's unit to see if it is in the area, so we will set this field to the player unit (in this example called "Player"); to do this simply click the field and select the player's unit from the list of available units. The "+ object" button will create another object field, allowing you to check if multiple units are in the area. The target field in this case refers to what area we are checking the unit is in, so we will set this to "Teleport_Area". The "+ target" button does the same thing for targets that the "+ objects" button does for objects. We will leave all other settings at defaults, but for future reference here is what they do: | + | Next, we will click the "Condition" button and look for the "unitWhenInArea" condition and insert it into the trigger, this condition allows us to check whether a chosen unit is within a specified area at the moment the trigger is executed. When the condition is added it should automatically become selected in the "Element" section, scroll down in the trigger window so that all of the settings can be seen. The "object" field is what the condition is going to act on, in our case we want to check the player's unit to see if it is in the area, so we will set this field to the player unit (in this example called "Player"); to do this simply click the field and select the player's unit from the list of available units. The "+ object" button will create another object field, allowing you to check if multiple units are in the area. The target field, in this case, refers to what area we are checking the unit is in, so we will set this to "Teleport_Area". The "+ target" button does the same thing for targets that the "+ objects" button does for objects. We will leave all other settings at defaults, but for future reference here is what they do: |
− | Math allows you to specify how the unit is checked to be in the area; by default it is set to "3D" so the unit must we within the area, if it is set to 2D then along as the unit is within the 2D footprint of the area it doesn't matter how high up the unit is (this setting is mainly useful for triggers aimed at aircraft). This field can also be set to "notNear2D" or "notNear3D", these work the same as "2D" and "3D", but will activate the trigger when the unit is not within the area, instead of when the unit is within the area. The "object_type" and "unit_type_ex" settings allow you to specify criteria about the unit, by default it is set to "isAlive" which means the condition will be met as long as the unit is alive while it is in the area, this can be changed to other settings such as "isDamaged" so the trigger will only activate if the player is both within the area and has damage to their vehicle. Finally check_objects comes in useful if you have specified multiple units to check, it allows you to say whether the trigger should activate if any of the units are in the area, or if all of the specified units must be in the area for the trigger to carry out its actions. This also works if a squad has been set as the object instead of an individual unit, it let you choose whether a single unit from the squad or the entire squad is required to be in the area. | + | Math allows you to specify how the unit is checked to be in the area; by default it is set to "3D" so the unit must we within the area, if it is set to 2D then along as the unit is within the 2D footprint of the area it doesn't matter how high up the unit is (this setting is mainly useful for triggers aimed at aircraft). This field can also be set to "notNear2D" or "notNear3D", these work the same as "2D" and "3D", but will activate the trigger when the unit is not within the area, instead of when the unit is within the area. The "object_type" and "unit_type_ex" settings allow you to specify criteria about the unit, by default it is set to "isAlive" which means the condition will be met as long as the unit is alive while it is in the area, this can be changed to other settings such as "isDamaged" so the trigger will only activate if the player is both within the area and has damage to their vehicle. Finally, check_objects comes in useful if you have specified multiple units to check, it allows you to say whether the trigger should activate if any of the units are in the area, or if all of the specified units must be in the area for the trigger to carry out its actions. This also works if a squad has been set as the object instead of an individual unit, it let you choose whether a single unit from the squad or the entire squad is required to be in the area. |
− | Next click the "Action" button and from the list select "unitMoveTo" and insert it into your trigger. This action can be used to do various things relating to | + | Next, click the "Action" button and from the list select "unitMoveTo" and insert it into your trigger. This action can be used to do various things relating to units movement (such as telling AI to move to a certain place in a certain way), but we will use it for its ability to teleport units, in this case, the player. Once inserted set the object to the player's unit and target to "Destination_Area", then click the "+ move_type" button to add the move_type field to the trigger and set the field to "teleport". There are a lot of other fields here which will be useful for when you make more advanced missions, but they are outside the scope of this basic guide. |
− | Our trigger is now complete; every 0.1 seconds (10 times a second) it will check if the player's unit is within the "Teleport_Area" area and if it is it will teleport the player to the "Destination_Area" area, if the player is not in the teleport area it won't do anything. Now finish off the mission (give it a name, assign the player unit as the player, set the map to the correct map, that sort of stuff) and test it out in game. | + | Our trigger is now complete; every 0.1 seconds (10 times a second) it will check if the player's unit is within the "Teleport_Area" area and if it is it will teleport the player to the "Destination_Area" area, if the player is not in the teleport area it won't do anything. Now finish off the mission (give it a name, assign the player unit as the player, set the map to the correct map, that sort of stuff) and test it out in-game. |
==List of all Events== | ==List of all Events== | ||
Line 93: | Line 93: | ||
'''Fields:''' | '''Fields:''' | ||
− | * time: The | + | * time: The number of seconds from the start of the mission after which the trigger will be executed, accurate to 2 decimal places |
* var: An integer variable can be assigned here to override the value of the "time" field (use of integer variable limits interval to whole seconds if this option is chosen) | * var: An integer variable can be assigned here to override the value of the "time" field (use of integer variable limits interval to whole seconds if this option is chosen) | ||
</div></div> | </div></div> | ||
Line 131: | Line 131: | ||
* controlMode: what control mode (mouse-aim, instructor / simplified, realistic or full-real) the condition will check for | * controlMode: what control mode (mouse-aim, instructor / simplified, realistic or full-real) the condition will check for | ||
− | * is: Can either be "equal", "notEqual", "less", or "more", if "equal" then trigger carries out actions when the current control-mode matches the one set in the "controlMode" field, if "notEqual" trigger will carry out actions when the game-mode does not match the one set in the "controlMode" field. | + | * is: Can either be "equal", "notEqual", "less", or "more", if "equal" then trigger carries out actions when the current control-mode matches the one set in the "controlMode" field, if "notEqual" trigger will carry out actions when the game-mode does not match the one set in the "controlMode" field. The functionality of "less" and "more" is not confirmed but may allow for checking if the user's control scheme is set to less or more realist than the chosen value. |
</div></div> | </div></div> | ||
| SP only | | SP only | ||
Line 144: | Line 144: | ||
|- | |- | ||
| gameWhenManualGear | | gameWhenManualGear | ||
− | | Will activate trigger if the user currently has "Autocontrol of landing gear" turned off in game controls | + | | Will activate trigger if the user currently has "Autocontrol of landing gear" turned off in-game controls |
| SP only | | SP only | ||
|- | |- | ||
| gameWhenObjectivesNotDisplayed | | gameWhenObjectivesNotDisplayed | ||
− | | Will activate trigger if no mission objective is currently being displayed on screen | + | | Will activate trigger if no mission objective is currently being displayed on the screen |
| Unknown | | Unknown | ||
|- | |- | ||
Line 201: | Line 201: | ||
|- | |- | ||
| missionIsSuccess | | missionIsSuccess | ||
− | | Activates trigger if mission is completed successfully | + | | Activates trigger if the mission is completed successfully |
| Both | | Both | ||
|- | |- | ||
| missionIsZoneCaptured | | missionIsZoneCaptured | ||
| <div class="mw-collapsible mw-collapsed" style="width:100%">Will activate trigger if a specified zone is captured by a specified team<div class="mw-collapsible-content"> | | <div class="mw-collapsible mw-collapsed" style="width:100%">Will activate trigger if a specified zone is captured by a specified team<div class="mw-collapsible-content"> | ||
− | It may be possible to make this trigger work in single player | + | It may be possible to make this trigger work in single-player but requires certain mission settings to be set. |
'''Fields:''' | '''Fields:''' | ||
Line 217: | Line 217: | ||
| missionWhenAdditionalTime | | missionWhenAdditionalTime | ||
| <div class="mw-collapsible mw-collapsed" style="width:100%">Will activate trigger if a specified amount of time has passed since the successful completion of the mission<div class="mw-collapsible-content"> | | <div class="mw-collapsible mw-collapsed" style="width:100%">Will activate trigger if a specified amount of time has passed since the successful completion of the mission<div class="mw-collapsible-content"> | ||
− | When a ( | + | When a (singleplayer) mission is marked as completed the player has the option to return to the hangar or continue playing, this condition will activate the trigger once a specified amount of time has passed from the completion of the mission should the player chooses to continue playing. |
'''Fields:''' | '''Fields:''' | ||
Line 258: | Line 258: | ||
* value: The distance between the player and the target | * value: The distance between the player and the target | ||
* var: An integer variable can be assigned here to override the value of the "value" field | * var: An integer variable can be assigned here to override the value of the "value" field | ||
− | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how distance is calculated 2D is just concerned with 2D distance (distance between two objects on if drawn on a top down map), whereas 3D takes height difference into consideration; notNear will activate trigger if players are not within the distance, instead of being within the specified distance. | + | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how distance is calculated 2D is just concerned with 2D distance (distance between two objects on if drawn on a top-down map), whereas 3D takes height difference into consideration; notNear will activate trigger if players are not within the distance, instead of being within the specified distance. |
− | * player: the status of the player | + | * player: the status of the player to be considered by the condition |
− | * target_type: The status of the object | + | * target_type: The status of the object to be considered by the condition |
− | * check_players: can be "any" or "all", | + | * check_players: can be "any" or "all", decide if all players must be within distance or just one |
− | * check_targets: can be "any" or "all", | + | * check_targets: can be "any" or "all", decide if the player must be within the specified distance of all targets or just one |
* team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | * team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | ||
</div></div> | </div></div> | ||
Line 285: | Line 285: | ||
* target: the area to check if the player is within | * target: the area to check if the player is within | ||
* math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the players position is calculated 2D is just concerned with if the player is within the 2D footp[rint of the area, regardless of hight, whereas 3D takes height into consideration; notNear will activate trigger if player is not within the area, instead of being within the specified area. | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the players position is calculated 2D is just concerned with if the player is within the 2D footp[rint of the area, regardless of hight, whereas 3D takes height into consideration; notNear will activate trigger if player is not within the area, instead of being within the specified area. | ||
− | * players: the status of the player | + | * players: the status of the player to be considered by the condition |
− | * check_players: can be "any" or "all", | + | * check_players: can be "any" or "all", decide if all players must be within distance or just one |
* team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | * team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | ||
</div></div> | </div></div> | ||
Line 406: | Line 406: | ||
* value: The distance between the unit and the target | * value: The distance between the unit and the target | ||
* var: An integer variable can be assigned here to override the value of the "value" field | * var: An integer variable can be assigned here to override the value of the "value" field | ||
− | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how distance is calculated 2D is just concerned with 2D distance (distance between two objects on if drawn on a top down map), whereas 3D takes height difference into consideration; notNear will activate trigger if players are not within the distance, instead of being within the specified distance. | + | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how distance is calculated 2D is just concerned with 2D distance (distance between two objects on if drawn on a top-down map), whereas 3D takes height difference into consideration; notNear will activate trigger if players are not within the distance, instead of being within the specified distance. |
− | * object_type: The status of the unit | + | * object_type: The status of the unit to be considered by the condition |
* unit_type_ex: Unknown, likely more options for checking the status of units before activating the trigger | * unit_type_ex: Unknown, likely more options for checking the status of units before activating the trigger | ||
− | * target_type: The status of the target | + | * target_type: The status of the target to be considered by the condition |
− | * target_marking: '''Only works for Multiplayer''' A number between 0 and 31. Checks the marking of the target unit, units are marked with a number using the unitMark action. If multiple targets are selected only targets with the correct marking are considered by the trigger, e.g. if set to 5 the trigger will only activate if the unit is within the set distance of a target with a marking of 5, even if the unit is within | + | * target_marking: '''Only works for Multiplayer''' A number between 0 and 31. Checks the marking of the target unit, units are marked with a number using the unitMark action. If multiple targets are selected only targets with the correct marking are considered by the trigger, e.g. if set to 5 the trigger will only activate if the unit is within the set distance of a target with a marking of 5, even if the unit is within range of another target with a different marking. |
* check_objects: can be "any" or "all", where there are multiple objects set decides if all objects must be within distance or just one | * check_objects: can be "any" or "all", where there are multiple objects set decides if all objects must be within distance or just one | ||
− | * check_targets: can be "any" or "all", | + | * check_targets: can be "any" or "all", decide if the object must be within the specified distance of all targets or just one |
− | * compareCenters: Determines if measurement is taken from | + | * compareCenters: Determines if the measurement is taken from the centre of the object and target or closest point |
* check_all_units: Functionality unknown | * check_all_units: Functionality unknown | ||
</div></div> | </div></div> | ||
Line 419: | Line 419: | ||
|- | |- | ||
| unitFuelLess | | unitFuelLess | ||
− | | <div class="mw-collapsible mw-collapsed" style="width:100%">Activates the trigger when the specified units remaining fuel is below a specified amount ( | + | | <div class="mw-collapsible mw-collapsed" style="width:100%">Activates the trigger when the specified units remaining fuel is below a specified amount (possibly bugged / non-functional)<div class="mw-collapsible-content"> |
'''Fields:''' | '''Fields:''' | ||
Line 442: | Line 442: | ||
* object: The unit to check | * object: The unit to check | ||
− | * func: Can be "less", "more", "equal", "notEqual" "notLess", " | + | * func: Can be "less", "more", "equal", "notEqual" "notLess", "notMore", determines how to compare the control position to the number specified. |
− | * value: A number accurate to 2 d.p, determines what the control setting should be checked against (e.g. for flaps 0 might be flaps fully up, 1 might be flaps fully down and 0.5 flaps | + | * value: A number accurate to 2 d.p, determines what the control setting should be checked against (e.g. for flaps 0 might be flaps fully up, 1 might be flaps fully down and 0.5 flaps halfway; these are made up and untested numbers, you will need to experiment). |
* property: The control to check. | * property: The control to check. | ||
</div></div> | </div></div> | ||
Line 450: | Line 450: | ||
| unitWhenCountMatches | | unitWhenCountMatches | ||
| <div class="mw-collapsible mw-collapsed" style="width:100%">Activates trigger when the number of units meeting the condition is equal to the number set<div class="mw-collapsible-content"> | | <div class="mw-collapsible mw-collapsed" style="width:100%">Activates trigger when the number of units meeting the condition is equal to the number set<div class="mw-collapsible-content"> | ||
− | All units assigned under the object field of this condition are counted together, including units which have had their count increased. For example if two units have been assigned and one has had its count increased to 5 then the trigger will consider the status of all 5 | + | All units assigned under the object field of this condition are counted together, including units which have had their count increased. For example, if two units have been assigned and one has had its count increased to 5 then the trigger will consider the status of all 5 subunits and the other unit, for a total of 6. If the object_type is set to isAlive with the function less than 3 then the death of any four units will activate the trigger. |
'''Fields:''' | '''Fields:''' | ||
Line 486: | Line 486: | ||
* target: The area to check if the unit is within | * target: The area to check if the unit is within | ||
* math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the players position is calculated 2D is just concerned with if the player is within the 2D footprint of the area, regardless of hight, whereas 3D takes height into consideration; notNear will activate trigger if player is not within the area, instead of being within the specified area. | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the players position is calculated 2D is just concerned with if the player is within the 2D footprint of the area, regardless of hight, whereas 3D takes height into consideration; notNear will activate trigger if player is not within the area, instead of being within the specified area. | ||
− | * object_type: The status of the unit | + | * object_type: The status of the unit to be considered by the condition |
* unit_type_ex: Unknown, likely more options to check the unit's status. | * unit_type_ex: Unknown, likely more options to check the unit's status. | ||
− | * enemy_type: The status of the enemy unit | + | * enemy_type: The status of the enemy unit to be considered by the condition |
− | * check_objects: can be "any" or "all", | + | * check_objects: can be "any" or "all", decide if all specified units must be within the area or just one |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 501: | Line 501: | ||
* object: The units to check | * object: The units to check | ||
* target: The landing zone to check (landing zones are assigned with the "missionMarkAsLandingZone" action, for the condition select the area you assigned as a landing zone with this action) | * target: The landing zone to check (landing zones are assigned with the "missionMarkAsLandingZone" action, for the condition select the area you assigned as a landing zone with this action) | ||
− | * object_type: the status of the unit | + | * object_type: the status of the unit to be considered by the condition |
− | * check_objects: can be "any" or "all", | + | * check_objects: can be "any" or "all", decide if all players must be within distance or just one |
* aterRepaired: Functionality unknown | * aterRepaired: Functionality unknown | ||
</div></div> | </div></div> | ||
Line 514: | Line 514: | ||
* object: The units to check | * object: The units to check | ||
− | * func: Can be "less", "more", "equal", "notEqual" "notLess", " | + | * func: Can be "less", "more", "equal", "notEqual" "notLess", "notMore", determines how to compare the part's health to the number specified |
− | * check_objects: Can be "any" or "all", | + | * check_objects: Can be "any" or "all", decide if all players must be within distance or just one |
* check_parts: Can be "any", "all", "notAll", "notAny", if multiple damage model parts are listed determines which ones of them need to meet the criteria in order for the trigger to activate (e.g. if "any" is set then if any part meets the required HP then the trigger will activate) | * check_parts: Can be "any", "all", "notAll", "notAny", if multiple damage model parts are listed determines which ones of them need to meet the criteria in order for the trigger to activate (e.g. if "any" is set then if any part meets the required HP then the trigger will activate) | ||
* value: A number accurate to 2 decimal places, the value the current health of the part should be compared to (0 is destroyed 1 is full health) | * value: A number accurate to 2 decimal places, the value the current health of the part should be compared to (0 is destroyed 1 is full health) | ||
Line 571: | Line 571: | ||
* target: The unit to check | * target: The unit to check | ||
* useForTriggerFiltered: This option is only usually seen in actions, it is unclear what purpose it serves in a condition | * useForTriggerFiltered: This option is only usually seen in actions, it is unclear what purpose it serves in a condition | ||
− | * tags: Clicking this will give you the option to add in various | + | * tags: Clicking this will give you the option to add in various checkboxes to check the units tag against. Should the unit's tags align with those selected then the trigger will activate. For example adding and unchecking the "type_bomber" tag will activate the trigger if the specified unit is not a bomber; likewise, if only the "type_medium_tank" and "country_ussr" boxes are added and ticked then the trigger will only activate if the specified unit is a Russian medium tank. |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 667: | Line 667: | ||
* control: The control the player should press, you can find a reference of all controls IDs [[CDK_Reference#Controls|here]] | * control: The control the player should press, you can find a reference of all controls IDs [[CDK_Reference#Controls|here]] | ||
− | * timer: How long the player needs to hold the control down | + | * timer: How long the player needs to hold the control down for the trigger to activate (in seconds) |
* pressed: If checked the trigger will activate when the player presses the control, if unchecked the trigger will activate when the player is not pressing the key | * pressed: If checked the trigger will activate when the player presses the control, if unchecked the trigger will activate when the player is not pressing the key | ||
− | * checkUp: If checked trigger will be activated when player releases the specified control, | + | * checkUp: If checked, the trigger will be activated when the player releases the specified control. If unchecked, the trigger will be activated when the player presses control. It is unclear whether this option currently functions correctly. |
− | * gamepadControls: Exact functionality unknown, presumably relates to use of a gamepad instead of mouse and keyboard. | + | * gamepadControls: Exact functionality unknown, presumably relates to the use of a gamepad instead of mouse and keyboard. |
* team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | * team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | ||
</div></div> | </div></div> | ||
Line 697: | Line 697: | ||
* timer: How long the axis must have been at a value matching the requirement (in seconds) | * timer: How long the axis must have been at a value matching the requirement (in seconds) | ||
* absValue: Functionality unknown | * absValue: Functionality unknown | ||
− | * gamepadControls: Exact functionality unknown, presumably relates to use of a gamepad instead of mouse and keyboard. | + | * gamepadControls: Exact functionality unknown, presumably relates to the use of a gamepad instead of mouse and keyboard. |
* team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | * team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | ||
* func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the axis value should compare the the value in order to activate the trigger. | * func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the axis value should compare the the value in order to activate the trigger. | ||
− | * joyAngle: Exact functionality unknown, presumably relates to angle of the player's joystick (for players using one). | + | * joyAngle: Exact functionality unknown, presumably relates to the angle of the player's joystick (for players using one). |
* joyDispersion: Exact functionality unknown, presumably relates to players using a joystick | * joyDispersion: Exact functionality unknown, presumably relates to players using a joystick | ||
* joyMinRad: Exact functionality unknown, presumably relates to players using a joystick | * joyMinRad: Exact functionality unknown, presumably relates to players using a joystick | ||
Line 781: | Line 781: | ||
'''Fields:''' | '''Fields:''' | ||
− | * target: Assign the area set as the start of the runway (if airfield was created using the addAirfield action) or the object group / carrier unit here (if airfield was made using a dynaf_ object group or AI aircraft carrier unit) | + | * target: Assign the area set as the start of the runway (if the airfield was created using the addAirfield action) or the object group/carrier unit here (if the airfield was made using a dynaf_ object group or AI aircraft carrier unit) |
* team: Which team the airfield should appear as flashing for "A", "B" or "Both" or "None" | * team: Which team the airfield should appear as flashing for "A", "B" or "Both" or "None" | ||
− | * set: If the airfield indication should be | + | * set: If the airfield indication should be turned on or off by the trigger |
</div></div> | </div></div> | ||
|Both | |Both | ||
Line 790: | Line 790: | ||
|airfieldSetVisibility | |airfieldSetVisibility | ||
|<div class="mw-collapsible mw-collapsed" style="width:100%">This action does not appear to currently be functional<div class="mw-collapsible-content"> | |<div class="mw-collapsible mw-collapsed" style="width:100%">This action does not appear to currently be functional<div class="mw-collapsible-content"> | ||
− | Presumably this action should change the airfield's visibility on the map / radar, but it currently appears to do nothing. | + | Presumably, this action should change the airfield's visibility on the map/radar, but it currently appears to do nothing. |
'''Fields:''' | '''Fields:''' | ||
Line 929: | Line 929: | ||
* respawnVerticalOffset: How high the player should respawn relative to the waypoint | * respawnVerticalOffset: How high the player should respawn relative to the waypoint | ||
* respawnForwardOffset: How far forwards the player should respawn relative to the waypoint | * respawnForwardOffset: How far forwards the player should respawn relative to the waypoint | ||
− | * statisticsScreenAfterFinish: If ticked once players have finished the race they will be forced into the | + | * statisticsScreenAfterFinish: If ticked once players have finished the race they will be forced into the statistics screen |
− | * reverse: If the waypoints should be followed in reverse order (highest number to lowest number), mostly used for triggers | + | * reverse: If the waypoints should be followed in reverse order (highest number to lowest number), mostly used for triggers launching the race when the user selects reverse mode (used in conjunction with the missionNamePostfix condition) |
− | * isPathClosed: If the last waypoint of the race links | + | * isPathClosed: If the last waypoint of the race links backs up to first waypoint (forming a circuit) or if it does not (race starts at one point, and ends at another). |
− | * defaultTimeToDisableWeapon: How long after | + | * defaultTimeToDisableWeapon: How long after the beginning to disable player weapons (most races opt to use other actions such as the cannotShoot option in unitSetProperties to disable player weaponry). |
</div></div> | </div></div> | ||
|Both | |Both | ||
Line 982: | Line 982: | ||
| missionAttempts | | missionAttempts | ||
|<div class="mw-collapsible mw-collapsed" style="width:100%">Allows you to modify how many attempts the player gets at a mission<div class="mw-collapsible-content"> | |<div class="mw-collapsible mw-collapsed" style="width:100%">Allows you to modify how many attempts the player gets at a mission<div class="mw-collapsible-content"> | ||
− | Each time a player dies in a single player mission they loose one attempt (by default you get 5, so 4 respawns); this trigger allows you to modify how many they have left. '''NOTE:''' The game works by counting deaths, so using "set" and "1" will set the player to 1 death (3 respawns remaining), not set the to 1 attempt left. | + | Each time a player dies in a single-player mission they loose one attempt (by default you get 5, so 4 respawns); this trigger allows you to modify how many they have left. '''NOTE:''' The game works by counting deaths, so using "set" and "1" will set the player to 1 death (3 respawns remaining), not set the to 1 attempt left. |
'''Fields:''' | '''Fields:''' | ||
Line 1,002: | Line 1,002: | ||
'''Notes:''' | '''Notes:''' | ||
− | * Vertical hight of the area is irrelevant, if area is 10km x 10km x 2km then the player can go as high as they like as long as they are within the 10km x 10km area. | + | * Vertical hight of the area is irrelevant, if the area is 10km x 10km x 2km then the player can go as high as they like as long as they are within the 10km x 10km area. |
* Anywhere out of the battle area (air and ground) and not inside the killOutOfBattleArea will display the warning message "Return to the battlefield" constantly to the player until they go back inside the battle area | * Anywhere out of the battle area (air and ground) and not inside the killOutOfBattleArea will display the warning message "Return to the battlefield" constantly to the player until they go back inside the battle area | ||
* You can add multiple areas to set them as a whole at once (example: You select your 4 "north_restricted_area", "south_restricted_area", "east_restricted_area", "west_restricted_area" areas and check the killOutOfBattleArea field to combine their coverage) | * You can add multiple areas to set them as a whole at once (example: You select your 4 "north_restricted_area", "south_restricted_area", "east_restricted_area", "west_restricted_area" areas and check the killOutOfBattleArea field to combine their coverage) | ||
Line 1,008: | Line 1,008: | ||
'''Fields:''' | '''Fields:''' | ||
− | * area: The area(s) you want the trigger to act on. Multiple areas can be selected whether they overlap or not. The inside of each selected area will be affected by the trigger, all other | + | * area: The area(s) you want the trigger to act on. Multiple areas can be selected whether they overlap or not. The inside of each selected area will be affected by the trigger, all other areas in the map will not be. |
* message: Does not appear to currently be functional | * message: Does not appear to currently be functional | ||
* air: If ticked the battle area will be restricted for aircraft | * air: If ticked the battle area will be restricted for aircraft | ||
Line 1,029: | Line 1,029: | ||
* team: Which team completed the mission (the winning team) | * team: Which team completed the mission (the winning team) | ||
− | * timer: If a timer should be displayed until the mission ends and the player is returned to the hangar (if enabled it gives option to continue playing after the mission has ended, if disabled that option is not available) | + | * timer: If a timer should be displayed until the mission ends and the player is returned to the hangar (if enabled it gives the option to continue playing after the mission has ended, if disabled that option is not available) |
* debtiefingTimer: If the timer option is disabled, amount of time in seconds to wait before sending the players back to the hangar | * debtiefingTimer: If the timer option is disabled, amount of time in seconds to wait before sending the players back to the hangar | ||
* showCompleteMessage: If checked, displays the mission complete message | * showCompleteMessage: If checked, displays the mission complete message | ||
* playCompleteMusic: If checked, plays the mission complete music | * playCompleteMusic: If checked, plays the mission complete music | ||
− | * startReplayCamera: Removes control from player and puts them into cinematic camera position until they return to hangar | + | * startReplayCamera: Removes control from the player and puts them into cinematic camera position until they return to the hangar |
* afterComplete: Selects a trigger to run the actions of once the mission is completed (like the "triggerActivate" action) | * afterComplete: Selects a trigger to run the actions of once the mission is completed (like the "triggerActivate" action) | ||
</div></div> | </div></div> | ||
Line 1,116: | Line 1,116: | ||
* team: Which team fails the mission (the failing team) | * team: Which team fails the mission (the failing team) | ||
* debtiefingTimer: If the timer option is disabled, amount of time in seconds to wait before sending the players back to the hangar | * debtiefingTimer: If the timer option is disabled, amount of time in seconds to wait before sending the players back to the hangar | ||
− | * timer: If a timer should be displayed until the mission ends and the player is returned to the hangar (if enabled it gives option to continue playing after the mission has ended, if disabled that option is not available) | + | * timer: If a timer should be displayed until the mission ends and the player is returned to the hangar (if enabled it gives the option to continue playing after the mission has ended, if disabled that option is not available) |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 1,177: | Line 1,177: | ||
* canCapturebyGm: If checked will allow ground units to capture the zone | * canCapturebyGm: If checked will allow ground units to capture the zone | ||
* onlyPlayersCanCapture: If checked will allow players only to capture the zone | * onlyPlayersCanCapture: If checked will allow players only to capture the zone | ||
− | * zoneType: Select one of capture zone types (supremacy - team which has more units in the zone will start capturing it, without tickets bleeding and with capture end effect) | + | * zoneType: Select one of capture zone types (supremacy - the team which has more units in the zone will start capturing it, without tickets bleeding and with capture end effect) |
* silentMode: Remove any central screen messages and indication about capturing status and progress | * silentMode: Remove any central screen messages and indication about capturing status and progress | ||
− | * auto_smoke: If checked will automatically generate a smoke effect over the zone, it's painted in the owning team | + | * auto_smoke: If checked, will automatically generate a smoke effect over the zone, it's painted in the owning team colour |
* timeMultiplier: Changes the required time to capture the zone | * timeMultiplier: Changes the required time to capture the zone | ||
* disableZone: Disables capture zone | * disableZone: Disables capture zone | ||
Line 1,187: | Line 1,187: | ||
* name_for_respawn_base: Select name for respawn bases | * name_for_respawn_base: Select name for respawn bases | ||
* makeRespawnBaseAsDefault: Unknown | * makeRespawnBaseAsDefault: Unknown | ||
− | * captureNoPenalty: | + | * captureNoPenalty: If enabled, ticket bleeding will be disabled |
− | * markUnitPreset: Select if it's meant to be for tanks or ships (if for ships it will create buoys around it | + | * markUnitPreset: Select if it's meant to be for tanks or ships (if for ships it will create buoys around it and will draw a circle around it for tanks) |
* tags: Select which unit types should be able to capture it | * tags: Select which unit types should be able to capture it | ||
</div></div> | </div></div> | ||
Line 1,211: | Line 1,211: | ||
* primary: If checked will show first circle type, if unchecked will show second circle type | * primary: If checked will show first circle type, if unchecked will show second circle type | ||
* oriented: If checked the circle will always face you | * oriented: If checked the circle will always face you | ||
− | * ignoreDifficulty: If checked will show circles in every | + | * ignoreDifficulty: If checked will show circles in every game mode (even SB) |
* team: Select for which team circles should be visible | * team: Select for which team circles should be visible | ||
− | * scale: Select the size of circle | + | * scale: Select the size of the circle |
'''Notes:''' | '''Notes:''' | ||
Line 1,237: | Line 1,237: | ||
* object_type: unknown | * object_type: unknown | ||
* spawnArrangeTo: Will turn spawn icon and units to '''target''', instead using axis | * spawnArrangeTo: Will turn spawn icon and units to '''target''', instead using axis | ||
− | * posRecalcDelay: If spawnArrangeTo active | + | * posRecalcDelay: If spawnArrangeTo is active, sets the delay for the icon's position recalculation |
* useForTriggerFiltered: Will affect only those area that meet the '''Conditions''' | * useForTriggerFiltered: Will affect only those area that meet the '''Conditions''' | ||
* loc_name: Select name for created spawn zone | * loc_name: Select name for created spawn zone | ||
* spawnEffect: Unknown | * spawnEffect: Unknown | ||
− | * isStrictSpawn: Players will respawn on areas in order in which they are listed in squad | + | * isStrictSpawn: Players will respawn on areas in the order in which they are listed in the squad |
* resetStrictSpawnIndex: Allow to reset spawn zones index for isStrictSpawn mode | * resetStrictSpawnIndex: Allow to reset spawn zones index for isStrictSpawn mode | ||
* isAirfield: Will make the respawn point an airfield spawn, so you can spawn an aircraft there | * isAirfield: Will make the respawn point an airfield spawn, so you can spawn an aircraft there | ||
− | * isUnit: Makes it possible to assign the spawn position to selected unit | + | * isUnit: Makes it possible to assign the spawn position to the selected unit |
* forceCreate: Will create a spawn even if there is already a spawn on this point or unit | * forceCreate: Will create a spawn even if there is already a spawn on this point or unit | ||
* useExisting: Will use existing spawn if it already exists (with the same name) | * useExisting: Will use existing spawn if it already exists (with the same name) | ||
Line 1,254: | Line 1,254: | ||
* team: Select which team will be able to use spawn zones | * team: Select which team will be able to use spawn zones | ||
* awardByBodyHP: unknown | * awardByBodyHP: unknown | ||
− | * disableAfter: Removes spawn zones after specified time (seconds) | + | * disableAfter: Removes spawn zones after the specified time (seconds) |
− | * spawnOffset: Sets an offset of how many meters from the spawn's | + | * spawnOffset: Sets an offset of how many meters from the spawn's centre the unit will spawn away from, allows making a few spawns in the same one area but with some shifting |
− | * spawnOffsetSpace: Sets the offset type (in object coordinates or | + | * spawnOffsetSpace: Sets the offset type (in object coordinates or world coordinates) |
* tags: Select which unit types will be able to use spawn zones | * tags: Select which unit types will be able to use spawn zones | ||
</div></div> | </div></div> | ||
Line 1,945: | Line 1,945: | ||
* objects: Select what unit you want to change (it's AI behaviour preset) | * objects: Select what unit you want to change (it's AI behaviour preset) | ||
− | * loadtype: Select if you want to load only a single node (a single | + | * loadtype: Select if you want to load only a single node (a single manoeuvre) or the entire tree (an entire preset) |
* name: Set the name of node or tree | * name: Set the name of node or tree | ||
* playerAutopilot: If checked will make the player's unit be controlled by the AI | * playerAutopilot: If checked will make the player's unit be controlled by the AI | ||
Line 2,222: | Line 2,222: | ||
* recalculatePathDist: | * recalculatePathDist: | ||
* useFormationCenter: | * useFormationCenter: | ||
− | * | + | * shipTurnRadius: |
− | * follow_target: If checked will order the unit to follow selected '''target''' | + | * follow_target: If checked, will order the unit to follow selected '''target''' |
− | * fastClimb: If unchecked will make the unit climb at more steep angle | + | * fastClimb: If unchecked, will make the unit climb at more steep angle |
* destTimeMode: Unknown | * destTimeMode: Unknown | ||
− | * speed: | + | * speed: Sets how fast you want to move the unit to selected '''target''' (km/h IAS, default is 300 km/h). This seems to bypass the unit's speed limits |
* tas: If checked will make the unit keep TAS speed instead of IAS | * tas: If checked will make the unit keep TAS speed instead of IAS | ||
* destTimeOnTarget: Works only when you select '''destTimeMode''', Unknown | * destTimeOnTarget: Works only when you select '''destTimeMode''', Unknown | ||
Line 2,249: | Line 2,249: | ||
|- | |- | ||
| unitMark | | unitMark | ||
− | |<div class="mw-collapsible mw-collapsed" style="width:100%">Give | + | |<div class="mw-collapsible mw-collapsed" style="width:100%">Give a number to a selected unit<div class="mw-collapsible-content"> |
'''Notes:''' | '''Notes:''' | ||
* You can use it in unitWhenStatus condition or any other action where you can select unit's status type and there's an isMarked option or anything related to that | * You can use it in unitWhenStatus condition or any other action where you can select unit's status type and there's an isMarked option or anything related to that | ||
Line 2,256: | Line 2,256: | ||
* target: Select to which unit you want to give the number | * target: Select to which unit you want to give the number | ||
* useForTriggerFiltered: Will affect only those units that meet the '''Conditions''' | * useForTriggerFiltered: Will affect only those units that meet the '''Conditions''' | ||
− | * target_marking: | + | * target_marking: Sets the number for selected unit |
− | * target_marking_var: | + | * target_marking_var: Sets the number for selected unit using an integer variable |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 2,285: | Line 2,285: | ||
Plane | Plane | ||
Control | Control | ||
− | * ai_skill: | + | * ai_skill: Sets the skill level of the AI unit |
− | * thrust_mult: | + | * thrust_mult: Multiplies the unit's thrust by the given amount. This does not allow the unit to bypass its speed limits |
* aggresive_wingman: | * aggresive_wingman: | ||
* kamikaze: | * kamikaze: | ||
Line 2,305: | Line 2,305: | ||
* army: Change to which team belongs selected unit | * army: Change to which team belongs selected unit | ||
* targetableByAi: If unchecked will all AI units will ignore and not attack selected unit | * targetableByAi: If unchecked will all AI units will ignore and not attack selected unit | ||
− | * isImmortal: If checked will make the selected unit not take any damage when it's hit | + | * isImmortal: If checked, will make the selected unit not take any damage when it's hit. Note that units will still die from drowning, and planes will still die from ground collisions. The latter can be prevented by using the '''unitRestore''' action and its '''fullRestore''' parameter |
− | * invulnerabilityTimer: | + | * invulnerabilityTimer: Sets for how long '''isImmortal''' will be enabled after respawn |
− | * useAuxWeapon: If checked will make ground units use secondary weapons (like | + | * useAuxWeapon: If checked, will make ground units use secondary weapons (like MGs) |
* destroyRIByCollision: | * destroyRIByCollision: | ||
− | * | + | * engineFire: Presumably starts an engine fire |
* hideProb: | * hideProb: | ||
* aimPriorities: | * aimPriorities: | ||
Visibility params | Visibility params | ||
* isDelayed: Makes the selected unit disappear | * isDelayed: Makes the selected unit disappear | ||
− | * delayForObjects: | + | * delayForObjects: Sets the random time delay in seconds (for example - 1, 5, so it will take 1 to 5 seconds to for example to make the unit disappear) |
− | * stealthRadius: | + | * stealthRadius: Sets the distance at which all markers over selected unit will not be visible |
− | * calmDetection: If checked will disable blinking of enemy unit marking icon when it's spotted (when player looks at it and that unit appears on map) | + | * calmDetection: If checked, will disable blinking of enemy unit marking icon when it's spotted (when player looks at it and that unit appears on map) |
− | * delayedTimeAfterDeath: | + | * delayedTimeAfterDeath: Sets the unit's post-death disappearence delay to the given amount of time, in seconds |
− | * forceVisibleOnMap: If checked will make selected unit always visible on map | + | * forceVisibleOnMap: If checked, will make selected unit always visible on map, regardless of the game mode |
− | * forceLockTarget: If checked the game will lock on (the same functionality as '''Lock Target''' controls from '''Common''' tab) selected target | + | * forceLockTarget: If checked, the game will lock on (the same functionality as '''Lock Target''' controls from '''Common''' tab) selected target |
Attack params | Attack params | ||
* attack_type: Select attack type of selected unit | * attack_type: Select attack type of selected unit | ||
− | * targetAir: | + | * targetAir: If checked, the unit will only target air units |
− | * targetGnd: | + | * targetGnd: If checked, the unit will only target ground units |
− | * accuracy: | + | * accuracy: Sets the fire accuracy of the selected unit (only applies to AI units) |
* maxDeviationAngle: | * maxDeviationAngle: | ||
* checkVisibilityTarget: | * checkVisibilityTarget: | ||
− | * effShootingRate: | + | * effShootingRate: Multiplies the unit's base shooting rate by the given amount, for ground units |
− | * airEffShootingRate: | + | * airEffShootingRate: Multiplies the unit's base shooting rate by the given amount, for air units |
− | * effShootingRateByPlayer: | + | * effShootingRateByPlayer: Presumably multiplies the unit's base shooting rate by the amount of players in the battle |
* cannotShoot: If checked will make the AI stop shooting | * cannotShoot: If checked will make the AI stop shooting | ||
* aiGunnersEnabled: If checked will enable AI gunners (if unchecked will disable) | * aiGunnersEnabled: If checked will enable AI gunners (if unchecked will disable) | ||
* aiGunnersCanTargetGroundUnits: If checked will make the AI gunners attack ground units (if unchecked will disable this fuction) | * aiGunnersCanTargetGroundUnits: If checked will make the AI gunners attack ground units (if unchecked will disable this fuction) | ||
* aiGunnersDistance: Set the distance at which AI gunners can fire at targets from the enemy team | * aiGunnersDistance: Set the distance at which AI gunners can fire at targets from the enemy team | ||
− | * ignoresEnemy: If checked will make the selected unit ignore all units from the enemy team | + | * ignoresEnemy: If checked, will make the selected unit ignore all units from the enemy team |
− | * avoidFriendlyFire: | + | * avoidFriendlyFire: If checked, the unit won't attempt to fire if there is a friendly in-between hostile vehicles |
* trackingTime: | * trackingTime: | ||
* adaptiveAccuracyTime: | * adaptiveAccuracyTime: | ||
Movement params | Movement params | ||
* move_type: Select the move type | * move_type: Select the move type | ||
− | * speed: | + | * speed: Sets the speed of the selected unit, note that this doesn't allow you to bypass the unit's maximum speed limit |
− | * throttle: | + | * throttle: Sets the current throttle of the unit, works only on planes |
* speedVar: Set the speed of selected unit using a real variable | * speedVar: Set the speed of selected unit using a real variable | ||
* lockSpeed: Use this option to override the speed set in waypoints | * lockSpeed: Use this option to override the speed set in waypoints | ||
Line 2,347: | Line 2,347: | ||
* recalculateFollowPathDistance: | * recalculateFollowPathDistance: | ||
* shipTurnRadius: | * shipTurnRadius: | ||
− | * enableShipCollisionAvoidance: | + | * enableShipCollisionAvoidance: If checked and the unit is a ship, the unit will actively try to avoid collisions |
− | * advancedCollisionAvoidance: | + | * advancedCollisionAvoidance: If checked, the unit will (presumably) use a more advanced collision avoidance algorithm |
* moveSpeedKatShooting: | * moveSpeedKatShooting: | ||
* slowWhenEnemyNear: Set the speed multiplier when enemy unit is near the selected unit ('''object''') | * slowWhenEnemyNear: Set the speed multiplier when enemy unit is near the selected unit ('''object''') | ||
* slowWhenEnemyNearDistance: Set the distance between the enemy unit and '''object''' to activate '''slowWhenEnemyNear''' | * slowWhenEnemyNearDistance: Set the distance between the enemy unit and '''object''' to activate '''slowWhenEnemyNear''' | ||
* minDistBetween: Sets the minimal distance between two units (if set to 0 will disable any collision avoidance scripts) | * minDistBetween: Sets the minimal distance between two units (if set to 0 will disable any collision avoidance scripts) | ||
− | * ignoreCollisions: | + | * ignoreCollisions: If checked, the unit will effectively be immaterial |
* ignoresObstaclesOverTime: | * ignoresObstaclesOverTime: | ||
* bomberSpecialAttack: | * bomberSpecialAttack: | ||
− | * movable: | + | * movable: (Presumably) Whether the unit can be moved through collisions |
− | * cannotMove: If checked disables movement controls | + | * cannotMove: If checked, disables movement controls |
* allowOvertakeMode: Allows lagging units to catch up with the leader | * allowOvertakeMode: Allows lagging units to catch up with the leader | ||
* followLeader: Follow a leader (for ship bots) | * followLeader: Follow a leader (for ship bots) | ||
* denyLeadership: Avoid becoming a leader, leave the group, if currently leader - disband the group (for ship bots) | * denyLeadership: Avoid becoming a leader, leave the group, if currently leader - disband the group (for ship bots) | ||
* keep_leader_dist: Keep the distance behind the leader | * keep_leader_dist: Keep the distance behind the leader | ||
− | * startFullSpeed: | + | * startFullSpeed: If checked and the unit is a plane, the plane will spawn at its maximum speed |
Infantry params | Infantry params | ||
* usePosAsCover: | * usePosAsCover: | ||
Line 2,371: | Line 2,371: | ||
* playerEnabled: | * playerEnabled: | ||
* aiEnabled: | * aiEnabled: | ||
− | * enemyFireEvasion: | + | * enemyFireEvasion: Whether the AI will attempt to dodge enemy fire |
− | * enginesEnabled: | + | * enginesEnabled: Whether the unit's engines are enabled |
− | * takeoffPermission: | + | * takeoffPermission: Whether the AI unit is allowed to take-off |
* useSearchRadar: Makes the ground units use their radar (if they are equipped with it) | * useSearchRadar: Makes the ground units use their radar (if they are equipped with it) | ||
Aircraft params | Aircraft params | ||
Line 2,382: | Line 2,382: | ||
AAA params | AAA params | ||
* fireRandom: | * fireRandom: | ||
− | * targetChangeInterval: | + | * targetChangeInterval: Time in seconds at which the AAA gun should switch targets |
− | * targetChangeProb: | + | * targetChangeProb: The probability of the AAA gun to switch targets |
Visual params | Visual params | ||
* hasExhaust: | * hasExhaust: | ||
* disableFallUndergroundAtDestroyed: | * disableFallUndergroundAtDestroyed: | ||
− | * persistentAerobaticsSmoke: | + | * persistentAerobaticsSmoke: If checked and the unit is a plane, will permanently enable the plane's aerobatics smoke |
* smokeScreenActive: | * smokeScreenActive: | ||
Collision params | Collision params |
Revision as of 01:34, 28 October 2019
Triggers are an integral part of anything but the most basic of User Missions. This article covers the basic operation of triggers and what each available component does.
Contents
Overview
Triggers are a feature of the Mission Editor which allow for vastly more complicated missions to be created, they can be used for scripted events, as well as for enabling more advanced mission features such as capture points, spawn points, visible way-points, and much more. As well as being useful for making more advanced single-player missions an understanding of triggers is a necessity for creating multi-player user missions, as such missions require triggers to function.
Triggers consist of three main components (also known as elements): Events, Conditions, and Actions. An event is what causes the trigger to execute, for example, the "periodicEvent" event will execute the trigger according to the specified interval (for example once a second, or once every 15 seconds). Once a trigger is executed a condition determines whether the trigger should continue to carry out the actions assigned to it, or should not do anything / carry out any else actions assigned to it; for example the "UnitInArea" condition will carry out the triggers actions if the specified unit is within the specified area at the moment the trigger is executed. Finally, actions define what the trigger does once it is executed and the condition is met; for example "playHint" displays a message on the user's screen and "unitDamage" can be used to damage part of, or destroy a unit. Actions can also be assigned as "elseActions" which instead of being carried out when the condition is met, will be carried out when the trigger is executed, but the condition is not met. If there are no elseActions then the trigger will do nothing when the condition is not met. Triggers can be assigned multiple events, conditions and actions. If a trigger is created with no conditions then it will carry out its actions whenever it is executed, this is useful for triggers which always need to run, for example, a trigger to draw various lines on the mini-map at the start of the mission. Be aware that if a trigger is created without conditions and "enableAfterComplete" is ticked then the trigger will run forever, repeatedly every time this event occurs (for a default trigger this means it would carry out its actions once a second, every second for the entirety of the mission, unless it is disabled by another trigger).
Creating Triggers
The Basics
In order to make a trigger you first need to display the trigger window in the mission editor, this can be done by clicking the "Properties and Triggers / Mission Obj. info" button (looks like ) on the mission editor bar at the top of the editor. This will open the "Triggers / Mission Obj. Info" window (from here on known as the "trigger window") at the right-hand edge of your screen, this window is where you can edit triggers and mission objectives (for the time being it will be blank). Now in the properties window (where your mission settings are) scroll down until you reach the Triggers / Mission Ob. Navigation section and expand it if necessary.
This window is where all the triggers and objectives of your mission will be stored, organized under the (currently empty) "Triggers" and "Mission Objectives" folders. There are several buttons at the bottom of this section:
Trigger This button will create a new trigger, either inside the root "Triggers" folder inside the currently selected category.
Category This button will create a new category, either inside the root "Triggers" folder inside the currently selected category. Categories are essentially folders for triggers, functionally they serve no purpose to the mission and exist to allow you to organise your triggers. Categories can be created inside other categories and form folder trees which can be collapsed to hide triggers not currently of interest (collapsing categories will not disable or remove their contents). If a category is disabled all of its contents (including stuff in subcategories) will be disabled.
Mission Obj This button will create a mission objective in the "Mission Objectives" folder. Mission objectives are described in other guides.
Copy and Paste The Copy button will copy the selected trigger or mission objective. If a mission objective is selected and the copy button is pressed then a duplicate mission objective will be created. If a trigger is selected when the copy button is pressed then the Paste button will become available this allows you to select a different category for the trigger to be pasted into, once the destination is selected pressing the Paste button will create a duplicate of the copied trigger there.
Del This button will delete the selected trigger or mission objective.
Up and Down These buttons will move the selected trigger, category or mission objective up or down in the list, this does not affect the behaviour of the mission and is used to keep the lists organised.
To create your first trigger click the "Trigger" button, this will create your first trigger "Trigger_01" and display it in the trigger window. What you see will look similar to the image to the right (you will only have "Trigger_01" whereas the image has several other triggers, categories and objectives for demonstration purposes). At the top of the window is the triggers name, this can be changed to whatever you want (however should not be the same as any other triggers), it is best to pick a descriptive name such as "Setup" or "Teleport Player" to keep it clear what everything does, however, this is completely optional. The next option is an "Enabled" checkbox, by default, all triggers start enabled, disabling a trigger effectively prevents it from being executed. This is useful for triggers than you want to manually activate or execute at specific moments, as triggers can be enabled, disabled and even just executed without enabling it during the mission by other triggers. The next field is a comments box, this has no effect on the trigger's operation and is just for documenting what it does, it is completely optional.
Next is the trigger properties section this contains the following fields:
actionsType By default this is set to "PERFORM_ONE_BY_ONE" meaning the actions will be completed in the order they are present in the actions list of the trigger. This option can be changed to "PERFORM_ALL" where all actions are completed at the same time.
conditionsType By default this is set to "ALL", but can be changed to "ANY". For triggers with multiple conditions, this determines whether all of the conditions need to be met for the trigger to carry out its actions, or if any of the conditions being met is enough for the trigger to carry out its action(s).
enableAfterComplete By default this is set unchecked, meaning that once the trigger has carried out its actions, it becomes disabled. If it is checked then the trigger will carry out its actions every time it is executed and the condition is met, instead of just the first time.
Now we have reached the "Elements" section, and below it the "Element" section (Gaijin could have come up with better names) this is where you build your trigger; the "Elements" section is where you create the events, conditions, actions, and else actions of your trigger, while the "Element" section is where you modify the properties of each component. The elements area consists of a window with four folders where the contents of your trigger will be displayed, and underneath a collection of buttons:
Event, Condition, Action and ElseAction These buttons will display a new window with a list of all the available events, conditions and actions, depending on what button is pressed (the Action and elseAction buttons display the same list of actions, but will insert them into either the Actions or ElseActions area. There is a search box which will find the first item matching the phrase entered, it will only return the first entry in the list however, there may be more matches further down. To insert a component, select it from the list and click "Ok".
Up and Down These buttons will move the selected element up and down in the list. Changing the order of components only affects the Actions and ElseActions area where the actions will be carried out in the order they appear in the list. If actionsType is set to "PERFORM_ONE_BY_ONE" (the default setting) in the trigger properties area.
Delete This button will delete the selected trigger component.
Copy This will copy the selected trigger component, multiple components can be copied from different triggers (or the same one) without needing to press "Paste ..." each time.
Paste ... This button will display a list of all the copied components (grouped by type) and allow you to select one to paste into the currently selected trigger.
The "Element" section at the bottom will update with different fields and buttons depending on the currently selected trigger component.
Worked Example Trigger
In this example, we are going to make a simple trigger which will teleport the player to a new location when the player enters a specific area. For this example the player unit will be in a tank (placed as "tankModels" in the editor) called "Player", there will be an area called "Teleport_Area" and another called "Destination_Area" (exact setup can be seen in the image to the right). When the player tank enters "Teleport_Area" we want it to be teleported to "Destination_Area".
To follow along with this example create a "tankModels" unit type, assign it as the player's vehicle, call it "Player" and set it to a tank you own. Create two box areas for the teleport and destination areas (called "Teleport_Area" and "Destination_Area"). If not already present from reading the previous section create a new trigger.
You should now have a fresh trigger (likely called Trigger_01 or similar), we will begin by renaming the trigger to something more descriptive so if we come back to the mission later it is nice and clear what it does; to do this select the name field, delete the old name and type a new name for the trigger, for example "Teleport Player". We will leave most of the properties as default, however, we will tick "enableAfterComplete" as we want the player to be teleported every time they enter the area, not just the first time. We will then select the "periodicEvent" event and set its time field in the Element area to 0.1, this means the trigger will be executed and check if the player is in the area every 0.1 seconds.
Next, we will click the "Condition" button and look for the "unitWhenInArea" condition and insert it into the trigger, this condition allows us to check whether a chosen unit is within a specified area at the moment the trigger is executed. When the condition is added it should automatically become selected in the "Element" section, scroll down in the trigger window so that all of the settings can be seen. The "object" field is what the condition is going to act on, in our case we want to check the player's unit to see if it is in the area, so we will set this field to the player unit (in this example called "Player"); to do this simply click the field and select the player's unit from the list of available units. The "+ object" button will create another object field, allowing you to check if multiple units are in the area. The target field, in this case, refers to what area we are checking the unit is in, so we will set this to "Teleport_Area". The "+ target" button does the same thing for targets that the "+ objects" button does for objects. We will leave all other settings at defaults, but for future reference here is what they do:
Math allows you to specify how the unit is checked to be in the area; by default it is set to "3D" so the unit must we within the area, if it is set to 2D then along as the unit is within the 2D footprint of the area it doesn't matter how high up the unit is (this setting is mainly useful for triggers aimed at aircraft). This field can also be set to "notNear2D" or "notNear3D", these work the same as "2D" and "3D", but will activate the trigger when the unit is not within the area, instead of when the unit is within the area. The "object_type" and "unit_type_ex" settings allow you to specify criteria about the unit, by default it is set to "isAlive" which means the condition will be met as long as the unit is alive while it is in the area, this can be changed to other settings such as "isDamaged" so the trigger will only activate if the player is both within the area and has damage to their vehicle. Finally, check_objects comes in useful if you have specified multiple units to check, it allows you to say whether the trigger should activate if any of the units are in the area, or if all of the specified units must be in the area for the trigger to carry out its actions. This also works if a squad has been set as the object instead of an individual unit, it let you choose whether a single unit from the squad or the entire squad is required to be in the area.
Next, click the "Action" button and from the list select "unitMoveTo" and insert it into your trigger. This action can be used to do various things relating to units movement (such as telling AI to move to a certain place in a certain way), but we will use it for its ability to teleport units, in this case, the player. Once inserted set the object to the player's unit and target to "Destination_Area", then click the "+ move_type" button to add the move_type field to the trigger and set the field to "teleport". There are a lot of other fields here which will be useful for when you make more advanced missions, but they are outside the scope of this basic guide.
Our trigger is now complete; every 0.1 seconds (10 times a second) it will check if the player's unit is within the "Teleport_Area" area and if it is it will teleport the player to the "Destination_Area" area, if the player is not in the teleport area it won't do anything. Now finish off the mission (give it a name, assign the player unit as the player, set the map to the correct map, that sort of stuff) and test it out in-game.
List of all Events
For each item in the table click [Expand] for more details on implementation and available settings.
Event | Description | Available in SP or MP? |
---|---|---|
periodicEvent | Will execute the trigger repeatedly at a user defined interval
Fields:
|
Both |
timeExpires | Will execute the trigger once after a set number of seconds from mission start
Fields:
|
Both |
initMission | Trigger will be executed once at the start of the mission | Both |
List of all Conditions
For each item in the table click [Expand] for more details on implementation and available settings. Note: This section lists the intended functionality (where known) for each condition, some (a minority) may be legacy features, or just broken, and may not work properly if at all. "SP only", "MP only", "Both" and "Unknown" show whether the trigger component only works in Single-player missions, only works in Multi-player missions, works in both types of missions, or that the component is currently non-function / not enough is known about it to say.
Condition | Description | Available in SP or MP? |
---|---|---|
airfieldIsModuleHP | Condition does not appear to currently be functional | Unknown |
gameWhenDifficulty | Will check what the current game-mode is (AB, RB, SB or custom)
Fields:
|
Both |
gameWhenControlMode | Will check what the control mode the user has selected (mouse-aim, etc.)
Fields:
|
SP only |
gameWhenControlWarning | Condition does not appear to currently be functional | Unknown |
gameWhenHintIsNotActive | Will check if a hint is currently being displayed on the UI | Unknown |
gameWhenManualGear | Will activate trigger if the user currently has "Autocontrol of landing gear" turned off in-game controls | SP only |
gameWhenObjectivesNotDisplayed | Will activate trigger if no mission objective is currently being displayed on the screen | Unknown |
infantryTroopWhenKilledByPlayerMatches | Will check if the number of infantry units killed by the player matches a specified value
Fields:
|
SP only |
isAllPlayersInGame | Will activate trigger if all the players are in the game | MP only |
misObjStatus | Will activate trigger if a specified objective's current status matches a specified value
Fields:
|
Both |
missionNamePostfix | Condition does not appear to currently be functional | Unknown |
missionIsBombingAreaDestroyed | Will activate the trigger if the specified bombing area is destroyed
Fields:
|
Both |
missionIsLZCaptured | Will activate trigger if a specified landing zone is captured by a specified team (unclear if / how LZs currently work)
Fields:
|
Unknown |
missionIsRespawnAllowed | Checks if respawns are allowed in mission settings | Unknown |
missionIsSuccess | Activates trigger if the mission is completed successfully | Both |
missionIsZoneCaptured | Will activate trigger if a specified zone is captured by a specified team
It may be possible to make this trigger work in single-player but requires certain mission settings to be set. Fields:
|
MP only |
missionWhenAdditionalTime | Will activate trigger if a specified amount of time has passed since the successful completion of the mission
When a (singleplayer) mission is marked as completed the player has the option to return to the hangar or continue playing, this condition will activate the trigger once a specified amount of time has passed from the completion of the mission should the player chooses to continue playing. Fields:
|
SP only |
missionWhenInBattleArea | Will activate the trigger if any units are within the defined battle area
Fields:
|
Both |
missionWhenTime | Will activate the trigger if a specified amount of time has passed since the start of the mission
Fields:
|
Both |
objectExists | Functionality unknown | Unknown |
objGroupWhenStatus | Functionality unknown | Unknown |
playersDistanceBetween | Will activate the trigger if the player is within a set distance of a set object
Fields:
|
Both |
playersWhenEnemyNear | Will activate the trigger if the player is within a set distance of an enemy
Fields:
|
Both |
playersWhenInArea | Will activate the trigger if the player is within a set area
Fields:
|
Both |
playerWhenSpawn | Will activate when the player spawns
This condition is best used with the "useForTriggerFiltered" option on actions to allow the trigger to act only on units which have just spawned. Fields:
|
Both |
playersWhenOnLZ | Checks if a player is within the landing zone (unclear if / how LZs currently work)
It is currently unclear if this trigger works Fields:
|
Unknown |
playersWhenReachHeight | Checks if a player has reached a specified altitude
Fields:
|
Both |
playersWhenStatus | Checks the status of the player
Fields:
|
Both |
playersWhenManeuver | Checks what maneuver the player is carrying out
Fields:
|
Unknown |
playersWhenOptions | Checks what options the player is currently has using
This condition has a list of check boxes and drop downs to let you act on the players settings such as if they are currently in cockpit mode, currently zoomed in, are using a touch screen to play, are using mouse aim, are using a joystick, etc. Some or all settings may not work and some such as "currentMissileType" are left over from previous Gaijin games on the same engine and not relevant to War Thunder. |
Unknown |
playersWhenOrientation | Checks what orientation the player is currently at
Fields:
|
Unknown |
playersWhenCameraState | Checks what orientation the of the camera (in free look mode)
Fields:
|
Unknown |
playersWhenCursorIn | Functionality unknown
This appears to relate to how the mouse cursor is being used (mouse-aim, on-screen joystick, control of tank cross-hair etc.), but no functionality has been established after testing. |
Unknown |
playersWhenCurrentBullet | Checks which ammo slot the player has selected and activate trigger if it matches set value
As this condition only is believed to only work in single player, this effectively lets you check what ammo type the user is using as in single player missions you assign ammo to the player, so know what slot each shell is in. Fields:
|
Unknown |
triggerStatus | Checks the status of another trigger and activates trigger if it matches a set value
Fields:
|
Both |
unitDistanceBetween | Will activate the trigger if a unit is within a set distance of a set object
Fields:
|
Both |
unitFuelLess | Activates the trigger when the specified units remaining fuel is below a specified amount (possibly bugged / non-functional)
Fields:
|
Unknown |
unitAnyLess | Activates trigger if at least one unit from those specified does not match the given status
Fields:
|
Both |
unitWhenControls | Activates trigger if the units control positions match a given value
Fields:
|
Both |
unitWhenCountMatches | Activates trigger when the number of units meeting the condition is equal to the number set
All units assigned under the object field of this condition are counted together, including units which have had their count increased. For example, if two units have been assigned and one has had its count increased to 5 then the trigger will consider the status of all 5 subunits and the other unit, for a total of 6. If the object_type is set to isAlive with the function less than 3 then the death of any four units will activate the trigger. Fields:
|
Both |
unitWhenEnemyNear | Will activate the trigger if the specified unit is within a set distance of an enemy
Fields:
|
Both |
unitWhenInArea | Will activate the trigger if the specified unit is within the specified area
Fields:
|
Both |
unitWhenOnLZ | Checks if a unit is within the landing zone (unclear if / how LZs currently work)
It is currently unclear if this trigger works Fields:
|
Unknown |
unitWhenPartHp | Checks the health of a part of a unit
Using this trigger requires knowing the names of different parts of a unit's damage model, finding this information is up to you. Fields:
|
Unknown |
unitWhenProperties | Activates the trigger if a unit's current properties match specified values
Fields:
|
Both |
unitWhenReachHeight | Checks if the specified unit has reached a specified altitude
Fields:
|
Both |
unitWhenStatus | Checks the status of the specified unit
Fields:
|
Both |
unitCheckTag | Checks the tags of a specified unit
Each unit in the game has various tags assigned to it which describe it, such as what unit type it is (fighter, bomber, tank, ship, etc.) and what country it is. Working out what the tags are for a specific unit has is a fairly easy task and is done by just thinking about the unit, e.g. a spitfire will probably have the "type_fighter" and "country_britain" tags. Fields:
|
Both |
unitWhenHit | Will activate the trigger if the specified unit is hit (shot) with the option of specifying which unit hit it
Fields:
|
Both |
unitWhenKilled | Will activate the trigger if the specified unit is killed
Fields:
|
Both |
unitsInLineOfSight | Checks if two units have line of sight with each other
Fields:
|
Both |
unitsInSearchLight | Checks if unit is caught in a search light
Fields:
|
Both |
varCompareBool | Activates the trigger if the specified boolean variable matches the specified value
Fields:
|
Both |
varCompareInt | Activates the trigger if the specified integer variable matches the specified value
Fields:
|
Both |
varCompareReal | Activates the trigger if the specified real (decimal number) variable matches the specified value
Fields:
|
Both |
varCompareString | Activates the trigger if the specified string variable matches the specified value
Fields:
|
Both |
playerShortcutPressed | Activates the trigger if player presses a specified control
Fields:
|
SP only |
playerSeesUnit | Checks if player can see a specified unit
This appears to work like "unitsInLineOfSight", only requiring LOS between the player and the target unit, the player does not need to be looking at the unit. Fields:
|
SP only |
playerAxisValueReached | Checks if player has reached a certain value on a specified control axis
Fields:
|
SP only |
destructibleInArea | Checks the number of objects destroyed within a specified area
Fields:
|
Unknown |
airDropsNear | Checks if an airDrop is near a unit (unclear if / how air drops currently work)
Fields:
|
Unknown |
areaWhenInArea | Checks if an area is within another area
Fields:
|
Both |
List of all Actions
This is a list of all Actions and their known behaviour. Note: This list is user-provided, there could be missing actions or the described behaviour could be incorrect
Action | Description | MP/SP | Working |
---|---|---|---|
addAirfield | Adds a virtual airfield using the given areas
This trigger is used to make an airfield already present as part of the map a functioning airfield in the mission, use of this trigger is not needed for aircraft carriers and airfields made using the "dynaf_" object groups. Fields:
|
Both | Yes |
addTextToUnit | Adds text on the given unit
Fields:
|
Both | Yes |
airfieldSetIndication | Makes airfield flash green on map / radar
Fields:
|
Both | Yes |
airfieldSetVisibility | This action does not appear to currently be functional
Presumably, this action should change the airfield's visibility on the map/radar, but it currently appears to do nothing. Fields:
|
Both | Yes |
airfieldGetModuleHP | Gets the HP of a part of a modular airfield and save it to a real (decimal number) variable.
Fields:
|
Both | Yes |
airfieldSetModuleHP | Sets the HP of a part of a modular airfield and save it to a real (decimal number) variable.
Fields:
|
Both | Yes |
airfieldAddModuleHP | Adds a set number to the HP of a part of a modular airfield and save it to a real (decimal number) variable.
Fields:
|
Both | Yes |
airfieldSetFuelMul | Applies a multiplier to the rate at which the aircraft is refueled when it's on a modular airfield.
Fields:
|
Both | Yes |
airfieldSetReloadMul | Applies a multiplier to the rate at which the aircraft is reloaded when it's on a modular airfield.
Fields:
|
Both | Yes |
airfieldSetRepairMul | Applies a multiplier to the rate at which the aircraft is refueled when it's on a modular airfield.
Fields:
|
Both | Yes |
awardAchievement | Functionality unknown
Presumably this action is designed to award achievements to the player, but in testing it has had effect. Fields:
|
Unknown | Unknown |
changeUnit | This action does not appear to currently be functional | Unknown | Unknown |
checkEntity | Functionality unknown
Fields:
|
Unknown | Unknown |
comment | Adds comments to the trigger for documentation purposes
This action has no effect, it is coloured green in the editor and is used to simply add text comments to the trigger in the editor to document what it does. Fields:
|
Both | Yes |
countUnitsKilledByTeam | Counts the number of units killed by the specified team and assigns the value to a variable
Fields:
|
Both | Yes |
beginRaceMode | Starts a plane or tank race with the given settings
Fields:
|
Both | Yes |
bigQueryAddRecord | Functionality unknown | Unknown | Unknown |
getOwnArea | Functionality unknown | Unknown | Unknown |
hangarGetCountryNum | Functionality unknown | Unknown | Unknown |
makeSquad | Creates a squad from the given unit
Fields:
|
Both | Unknown |
makeSquadFromUnits | Same than makeSquad but with more options
Additional fields:
|
Both | Unknown |
setHeadSquad | Same than above, but instead creates the head (leading) squad
Additional fields:
|
Both | Unknown |
missionAttempts | Allows you to modify how many attempts the player gets at a mission
Each time a player dies in a single-player mission they loose one attempt (by default you get 5, so 4 respawns); this trigger allows you to modify how many they have left. NOTE: The game works by counting deaths, so using "set" and "1" will set the player to 1 death (3 respawns remaining), not set the to 1 attempt left. Fields:
|
SP Only | Yes |
missionBattleArea | Allows you to restrict the battle area to within a specified area
This action is used to either restrict the map to a certain area (make it smaller), or specify areas where players will be killed / spotted if they enter. Notes:
Fields:
|
Both | Yes |
missionComplete | Sets the mission as complete (victory) for the selected team, ends the battle
Fields:
|
Both | Yes |
missionCustomArtillery | Enables custom artillery (which can be set in Mission Settings/Versus params/customSuperArtillery)
Fields:
|
Unknown | Unknown |
missionDebriefing | Forces the player back to the hangar, works only after mission has been completed | Unknown | Yes |
missionDestroyArea | Marks the given area(s) as destruction objectives
Fields:
|
Both | Unknown |
missionGetBalanceLevel | Gets the mission's balance level (1-25) and stores it in the given variable
Fields:
|
Both | Unknown |
missionGetBombingAreaHP | Gets the remaining HP of a bombing area and assigns it to a variable
Fields:
|
Both | Yes |
missionGetMaxPlayers | Gets the maximum amount of players allowed in the game (set before mission is launched) and assigns it to a variable
Fields:
|
MP Only | Yes |
missionGetMaxRespawns | Gets the maximum number of respawns and assigns it to a variable (unclear if working currently)
Fields:
|
Unknown | Unknown |
missionHint | This action does not appear to currently be functional | Unknown | Unknown |
missionEnableMapAutoScale | Enables auto scalling of the ingame map | Unknown | Unknown |
missionFailed | Sets the mission as failed for the selected team, ends the battle
Fields:
|
Both | Yes |
missionKillEffects | Removes effects from the selected areas
Fields:
|
Both | Yes |
missionForceMusic | Forces playing selected sound track
Fields:
|
Unknown | Yes |
missionForceUpdate | Functionality unknown
Fields:
|
Unknown | Unknown |
missionDisableRadiochat | Disabled ingame radio messages (for example Cover me etc.)
Fields:
|
MP | Yes |
missionMarkAsCaptureZone | Creates capture zone in selected area
Fields:
|
Both | Yes |
missionMarkAsLandingZone | Placeholder
Fields:
|
Unknown | Unknown |
missionMarkAsWaypoint | Creates a circle (waypoint) in selected area
Fields:
Notes:
|
Both | Yes |
missionMarkUnitsForStrike | Placeholder
Fields:
|
Unknown | Unknown |
missionMarkAsRespawnPoint | Creates spawn zones in selected areas
Fields:
|
MP | Yes |
missionMarkAsRearmZone | Creates a rearm zone for airplanes (only for players)
Fields:
|
Both | Yes |
missionMarkAsExitZone | Creates a zone where the player can safely quit (bailout)
Fields:
|
MP | Yes |
missionShowMapLine | Shows a single line on the map
Fields:
|
Both | Yes |
missionShowMapIcon | Shows a single icon on the map
Fields:
|
Both | Yes |
missionCreatePickUps | Creates a small area where you can rearm your unit with an icon above it for ground units
Fields:
|
MP | Yes |
missionCreateRespawnBasesByTemplate | Placeholder
Fields:
|
MP | Yes |
missionPlayDialogue | Placeholder
Fields:
|
Unknown | Unknown |
missionSetBattleRoyaleArea | Placeholder
Fields:
|
MP | Yes |
missionSetBombingArea | Add a bombing area in selected area
Fields:
|
Both | Yes |
missionBombingAreaDamage | Inflict some damage to selected bombing area
Fields:
|
Both | Yes |
missionSetEndReason | Set the reason of ending the mission
Fields:
|
Unknown | Unknown |
missionSetFade | Add fading in or fading out of screen to the mission
Fields:
|
Both | Yes |
missionSetFailText | Set the text after failing the mission
Fields:
|
Unknown | Unknown |
missionSetProperties | Placeholder
Fields:
|
Both | Yes |
missionSetTimeIndicator | Show a time indicator in the bottom left corner
Fields:
|
Both | Yes |
missionSetTimeSpeed | Changes the mission time speed
Fields:
|
Both | Yes |
missionSetTargetsIndicator | Shows icons with a number of remaining units in the bottom left corner
Fields:
|
Both | Yes |
MissionStartCutscene | Placeholder
Fields:
|
Unknown | Unknown |
MissionStartGuiScene | Unknown
Fields:
|
Unknown | Unknown |
MissionStopCutscene | Stops the cutscene started by using MissionStartCutscene action
Fields:
|
Unknown | Unknown |
missionStopSpeech | Stops any ongoing dialogs | Unknown | Unknown |
missionControlJIP | Enable or disable join in pogress function
Fields:
|
Unknown | Unknown |
moAddMissionObjective | Adds a new objective (if it haven't been shown yet)
Fields:
|
Both | Yes |
moSetObjectiveStatus | Change the status of selected objective
Fields:
|
Both | Yes |
objectGroupSetAirfield | Unknown
Fields:
|
Unknown | Unknown |
playerControls | Enables or Disables selected control keys
Fields:
|
Unknown | Yes |
playerEmulateShortcut | Presses selected control key
Fields:
|
Unknown | Yes |
playerForceMoveToRespawnScreen | Unknown
Fields:
|
Unknown | Unknown |
playerLockTarget | Locks selected target (it's only related to the UI, not missiles)
Fields:
|
Unknown | Unknown |
playerOptions | Placeholder
Fields:
|
Unknown | Yes |
playHint | Shows a message on screen
Fields:
|
Both | Yes |
playerToggleHero | This action does not appear to currently be functional | SP | No |
playSound | Will play a selected sound
Fields:
|
Both | Yes |
raceRangeEnable | Placeholder
Fields:
|
Unknown | Unknown |
spawnOnAirfield | Spawn selected units on the airfield (on the ground)
Fields:
|
Unknown | Yes |
systemLog | Unknown functionality
Fields:
|
Unknown | Unknown |
systemStats | Unknown functionality
Fields:
|
Unknown | Unknown |
systemCommand | Unknown functionality
Fields:
|
Unknown | Unknown |
systemShakeCamera | Unknown functionality
Fields:
|
Unknown | Unknown |
systemPlayRumble | Unknown functionality
Fields:
|
Unknown | Unknown |
triggerActivate | Activates selected trigger
Fields:
|
Both | Yes |
triggerDisable | Disables selected triggers
Fields:
|
Both | Yes |
triggerEnable | Enables selected triggers
Fields:
|
Both | Yes |
tutorialArtilleryShootAtPos | Placeholder
Fields:
|
Unknown | Unknown |
tutorialArtilleryShowWarning | Placeholder
Fields:
|
Unknown | Unknown |
tacticalMapForceZoom | Placeholder
Fields:
|
Unknown | Unknown |
tacticalMapSetIconProperty | Placeholder
Fields:
|
Unknown | Unknown |
unitBlinkPart | Shows selected part of the ground unit (can be used to show for example tank crew position)
Fields:
|
SP | Yes |
unitDamage | Damage or destroy selected unit
Fields:
|
Both | Yes |
unitDestroyMissile | Unknown functionality
Fields:
|
Unknown | Unknown |
unitDoBailout | Select which air units should bailout (doesn't spawn any effects and doesn't destroy the airplane)
Fields:
|
Both | Yes |
UnitDropAmmo | Makes the unit drop all of it's bombs, fire all rockets and set it's ammunition amount to 0
Fields:
|
Both | Yes |
unitFire | Unknown functionality (probably doesn't work)
Fields:
|
Unknown | Unknown |
unitForceRearmSpeed | Set the rearm speed multiplier for Arcade Battles midair reload mechanics
Fields:
|
Both | Yes |
unitGetDistanceToVar | Placeholder
Fields:
|
Unknown | Unknown |
unitGetRandomNameFromSquad | Saves the name of a squad or specific unit from it in a string variable
Fields:
|
Both | Yes |
unitLandOnAirfield | Orders the AI unit to land on the airfield or water
Fields:
|
Both | Yes |
unitLoadBehTree | Loads specific AI behaviour presets
Fields:
Available trees (AI behaviour presets):
Available nodes: |
Both | Yes |
unitRespawn | Respawn units in selected area
Fields:
|
Both | Yes |
unitRestore | Rearms or repairs selected units
Fields:
|
Both | Yes |
unitPlayAnim | Unknown functionality | Unknown | Unknown |
unitPlayEffect | Shows custom effects in or over selected units
Notes:
Fields:
|
Both | Yes |
unitPutToSleep | Makes the selected unit disappear
Notes:
Fields:
|
Both | Yes |
unitSpawnOnObjectGroup | Unknown functionality | Unknown | Unknown |
unitWakeUp | Makes the selected unit appear again after using unitPutToSleep on them
Fields:
|
Both | Yes |
unitSetControls | Sets the control of an aircraft's gears, control surfaces, throttle and so, to anything between a minimum or maximum value
Fields:
|
Both | Yes |
unitSetIndication | Placeholder
Fields:
|
Unknown | Unknown |
unitSetStealth | Turn off any indications, markers and icons over selected units
Notes:
Fields:
|
Both | Yes |
unitSetCalmDetection | Placeholder
Fields:
|
Unknown | Unknown |
unitFollowWaypoints | Placeholder
Fields:
|
Unknown | Unknown |
unitAttackTarget | Order AI units attack selected targets
Fields:
|
Both | Yes |
unitMoveTo | Order AI units to move to selected area or unit
Fields:
Note: move - default move type, stand - orders the unit to stop, teleport - make the unit teleport to selected target, use_splines - orders the unit to use splines (blue lines with blue circles, usually roads), navmesh - orders the unit to move using navigation meshes (can be used only on maps for tanks)
|
Both | Yes |
unitMark | Give a number to a selected unit
Notes:
Fields:
|
Both | Yes |
unitMarkForEvent | Placeholder
Fields:
|
Unknown | Unknown |
unitSetAttachedMenCount | Unknown functionality | Unknown | Unknown |
unitSetDrownProperties | Unknown functionality | Unknown | Unknown |
UnitSetProperties | Provides the option to set multiple types of properties for each unit class, as well as some basic functionalities taken from other actions.
Fields: Plane Control
Unit status params
Visibility params
Attack params
Movement params
Infantry params
AI params
Aircraft params
AAA params
Visual params
Collision params
|
Both | Yes |