Triggers: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(→‎Type: Basic description)
m (Fix redirection)
Tag: Redirect target changed
 
(29 intermediate revisions by 11 users not shown)
Line 1: Line 1:
[[Image:Trigger_Window.jpg|300px|thumb|right|Trigger Window]]
#REDIRECT [[Trigger]]
__TOC__
 
 
==Introduction==
Triggers are an essential function for mission designers. A trigger (sometimes called a sensor) allows a mission designer to control events within a mission. Some common uses for triggers are controlling the timing of squad moves, camera control in cutscene, or even play the appropriate music when the time is right.
 
==Activation==
 
There are several combinations that can be created to activate the trigger. The trigger can be used to check if [[east]] or [[west]] is ''present'', ''not present'', or even ''detected by'' other sides within the trigger. A trigger can also be used to set up ''radio'' commands.
(Be aware though, that a unit that has been [[setCaptive]] will not trigger any ''detected'' events.)
 
A trigger can be linked to one particular unit or group by going into Group Mode (F2), and dragging a line from the trigger to the desired unit.  After this the Activation field will be set to "Vehicle". It can then be changed to either "Whole group", "Group leader" or "Any group member".
 
If an activation is set to "repeatedly" the trigger first has to be 'deactivated' before it can fire again (e.g. if a unit activated the trigger by entering it, it will first have to leave it, before the trigger can become active again.)
 
==Type==
 
What does the trigger do when activated
 
* None
* Guarded by OPFOR - make sure OPFOR units available as guards visit the area
* Guarded by BLUFOR
* Guarded by Independents
* Switch - switch a group to next waypoint (needs to be synchonized with a waypoint)
* End #1 - terminate the mission
* End #2
* End #3
* End #4
* End #5
* End #6
* Lose
 
==Countdown==
Defines (in seconds) how long to wait until '''On Activation''' is fired. Min, Max and Mid allow you to add some randomization to the time.
 
==Timeout==
Defines (in seconds) how long the trigger will be active for. Once the timeout limit is reached, the trigger will no longer be able to activate, regardless whether its condition field has been met. Min, Max and Mid allow you to add some randomization to the time.
 
==Condition==
In addition to the 'Activation' options above, this field allows you to specify other conditions that have to be fulfilled before  the Trigger activates. By default only the [[Boolean|boolean]] variable '''this''' is present in this field. It is set to the result of the main 'Activation' condition (e.g. 'east'/'present'). The expression in this field must return a [[Boolean|boolean]] value (e.g. "this && alive player"). Trigger conditions are tested every 0.5 seconds.
 
==On Activation/Deactivation==
Defines action that is performed when trigger condition changes to [[true]] or [[false]]. Expression must either be an assignment or return [[Nothing|nothing]]. Variable denoting trigger can be created by filling in [[name]] field. Array variable '''thisList''' will contain a list of all vehicles that met the trigger condition (e.g. hint format ["%1 units in area",count thisList]).<br>
 
==Effects==
[[Image:Trigger_Effects_Window.jpg|150px|right|thumb|Trigger Effects Window]]
Allows the mission designer to add music, environmental sounds, or to display title messages. Many use the effects to create quick and easy cutscenes.
 
[[Category:ArmA: Mission Editing]]
[[Category:Operation Flashpoint: Editing]]

Latest revision as of 18:36, 15 July 2022

Redirect to: