Eden Editor: Trigger: Difference between revisions
Killzone Kid (talk | contribs) (The menu in 3DEN says Anybody not Any) |
m (update) |
||
Line 32: | Line 32: | ||
== Attributes == | == Attributes == | ||
<!-- Exported from the game by BIS_fnc_3DENExportAttributes. Manual edits may be replaced by future exports. --> | <!-- Exported from the game by BIS_fnc_3DENExportAttributes. Manual edits may be replaced by future exports. --> | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 56: | Line 54: | ||
| <small><tt>text</tt></small> | | <small><tt>text</tt></small> | ||
| [[String]] | | [[String]] | ||
|- | |- | ||
| '''Position''' | | '''Position''' | ||
Line 84: | Line 66: | ||
| <small><tt>rotation</tt></small> | | <small><tt>rotation</tt></small> | ||
| [[Number]] | | [[Number]] | ||
|- | |||
| '''Size''' | |||
| Transformation | |||
| Area size in meters. | |||
| <small><tt>size2</tt></small> | |||
| [[Array]] | |||
|- | |||
| '''Size''' | |||
| Transformation | |||
| Area size in meters. | |||
| <small><tt>size3</tt></small> | |||
| [[Array]] | |||
|- | |||
| '''Shape''' | |||
| Transformation | |||
| Area shape. | |||
Available options: | |||
* '''Ellipse''' | |||
* '''Rectangle''' | |||
| <small><tt>IsRectangle</tt></small> | |||
| [[Bool]] | |||
|- | |- | ||
| '''Type''' | | '''Type''' | ||
Line 103: | Line 107: | ||
Available options: | Available options: | ||
* '''None''' - No default activation, only a custom condition expression can activate the trigger. | * '''None''' - No default activation, only a custom condition expression can activate the trigger. | ||
* '''Any Player''' - Activated when any player 'Activation Condition'. | * '''Any Player''' - Activated when any player of the given side satisfies the 'Activation Condition'. | ||
* '''Anybody''' - Activated when any object satisfies the 'Activation Condition'. | * '''Anybody''' - Activated when any object satisfies the 'Activation Condition'. | ||
* '''BLUFOR, OPFOR, Independent, Civilian, Game Logic''' - Activated when any object of the given side satisfies the 'Activation Condition'. | * '''BLUFOR, OPFOR, Independent, Civilian, Game Logic''' - Activated when any object of the given side satisfies the 'Activation Condition'. | ||
Line 124: | Line 128: | ||
| [[String]] | | [[String]] | ||
|- | |- | ||
| '''Activation | | '''Activation Type''' | ||
| Activation | | Activation | ||
| Condition of the 'Activation' attribute. | | Condition of the 'Activation' attribute. | ||
Line 139: | Line 143: | ||
| Repetition rules. When enabled, the trigger can be activated again once deactivated. | | Repetition rules. When enabled, the trigger can be activated again once deactivated. | ||
| <small><tt>repeatable</tt></small> | | <small><tt>repeatable</tt></small> | ||
| [[Bool]] | |||
|- | |||
| '''Server Only''' | |||
| Activation | |||
| When enabled, the trigger will be evaluated only on server. | |||
| <small><tt>isServerOnly</tt></small> | |||
| [[Bool]] | | [[Bool]] | ||
|- | |- |
Revision as of 09:43, 17 March 2020
A trigger is a virtual entity which executes an action once a specific condition is met.
A trigger has an area. It can be scaled in all axes and it can be rotated around Z (up) axis. Some areas have unlimited height by default, but that can be changed by manually adjusting their vertical scale. Setting it to negative value will make them unlimited vertically again.
You can see it visualized both in the scene and in the map, but by default you cannot interact with it. However, when the trigger is selected, you can drag it by its area in the map.
The activation condition can be based on the trigger area (e.g. no OFPOR present within a 500 m radius), but a scripted condition or combination of both can be applied as well.
Use Set Trigger Owner connection to assign the trigger to a specific group. It will change the available activation options from the general ones (e.g., any BLUFOR character) to the group specific ones (e.g., any member of the group).
Using the Timer attribute, you can allow the trigger to be activated either after a certain period of time since the condition has been met, or while the condition is met for the specified duration.
Once the condition is met, the trigger becomes activated. Its On Activation expression is executed, and the connected waypoints or modules may be activated as well.
If the trigger is set as repeatable, it will be deactivated once the condition is not met anymore. Afterwards, the trigger can be activated again, and this can continue until the scenario ends.
Triggers are the primary way to design the scenario flow without use of external scripts. Find out more about their configuration in the tooltips of their attributes.
Attributes
Info | Development | |||
---|---|---|---|---|
Name | Category | Description | Property | Type |
Variable Name | Init | Unique system name. Can contain only letters, numbers and underscore. The name is not case sensitive, so 'someName' and 'SOMENAME' are treated as the same variables. | name | String |
Text | Init | Trigger description. Players can see it in the radio menu when its activation is set to 'Radio'. Also visible in tooltip when hovering over the trigger in the editor. | text | String |
Position | Transformation | World coordinates in meters. X goes from West to East, Y from South to North and Z is height above terrain. | position | Position3D |
Rotation | Transformation | Local rotation in degrees. X is pitch, Y is roll and Z is yaw. | rotation | Number |
Size | Transformation | Area size in meters. | size2 | Array |
Size | Transformation | Area size in meters. | size3 | Array |
Shape | Transformation | Area shape.
Available options:
|
IsRectangle | Bool |
Type | Activation | Trigger type, determines special behavior upon activation.
Available options:
|
TriggerType | String |
Activation | Activation | What or who can activate the trigger. Some options further depend on 'Activation Condition'.
Available options:
|
ActivationBy | String |
Activation | Activation | What or who can activate the trigger. Some options further depend on 'Activation Type'. The available options are specific to the connected trigger owner.
Available options:
|
activationByOwner | String |
Activation Type | Activation | Condition of the 'Activation' attribute.
Available options:
|
activationType | String |
Repeatable | Activation | Repetition rules. When enabled, the trigger can be activated again once deactivated. | repeatable | Bool |
Server Only | Activation | When enabled, the trigger will be evaluated only on server. | isServerOnly | Bool |
Condition | Expression | Repeatedly calculated condition, must return boolean expression. When true, the trigger will be activated.
Passed variables are:
|
condition | String |
On Activation | Expression | Expression executed once the trigger is activated.
Passed variables are:
|
onActivation | String |
On Deactivation | Expression | Expression executed once the trigger is deactivated.
Passed variables are:
|
onDeactivation | String |
Timer Type | Timer | Type of activation timer.
Available options:
|
interuptable | Bool |
Timer Values | Timer | Timer values in seconds, selected randomly in a range from Min to Max, gravitating towards Mid. | timeout | Array in format [min, mid, max] |
Effect Condition | Effects | Condition for effects to be played, must return boolean expression. | effectCondition | String |
Sound | Effects | Sound played upon activation. | sound | String |
Voice | Effects | Sound spoken by the first unit which activated the trigger. | voice | String |
Environment | Effects | Environment sounds played upon activation. | soundEnvironment | String |
SFX | Effects | Sound effect played by the trigger upon activation. Repeats as long as the trigger is active. | soundTrigger | String |
Music | Effects | Music played upon activation. Replaces previously playing music track. | music | String |
UI Overlay | Effects | User interface overlay shown upon activation. | title | String |