setTriggerArea: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|arg= global | |arg= global | ||
|eff= local | |eff= local | ||
|gr1= Triggers | |gr1= Triggers | ||
| [[Image:setTriggerArea.jpg|thumb|300px|Trigger axis a, b and c (''half'' of their x, y and z dimensions)]] Defines the area monitored by the given trigger. The area could be either rectangular or elliptical. | | [[Image:setTriggerArea.jpg|thumb|300px|Trigger axis a, b and c (''half'' of their x, y and z dimensions)]] Defines the area monitored by the given trigger. The area could be either rectangular or elliptical. | ||
{{Informative | | {{Informative | | ||
Just like with a and b dimensions, c dimension will alter area in opposite directions from the trigger position along z axis. Therefore if the trigger position is on the surface, half of the trigger area will be above the surface and half below. To place the whole area above the surface, adjust trigger position (move it up c meters). If c is not specified or <{{=}} 0, the trigger's height is considered infinite like 2D triggers.}} | Just like with a and b dimensions, c dimension will alter area in opposite directions from the trigger position along z axis. Therefore if the trigger position is on the surface, half of the trigger area will be above the surface and half below. To place the whole area above the surface, adjust trigger position (move it up c meters). If c is not specified or <{{=}} 0, the trigger's height is considered infinite like 2D triggers.}} | ||
| trigger '''setTriggerArea''' [a, b, angle, isRectangle, c] | | trigger '''setTriggerArea''' [a, b, angle, isRectangle, c] | ||
|p1= trigger: [[Object]] - object of the type "EmptyDetector" | |p1= trigger: [[Object]] - object of the type "EmptyDetector" | ||
|p2= [a, b, angle, isRectangle, c]: [[Array]] | |p2= [a, b, angle, isRectangle, c]: [[Array]] | ||
|p3= a: [[Number]] - trigger area X size / 2, in meters | |p3= a: [[Number]] - trigger area X size / 2, in meters | ||
|p4= b: [[Number]] - trigger area Y size / 2, in meters | |p4= b: [[Number]] - trigger area Y size / 2, in meters | ||
|p5= angle: [[Number]] - trigger area rotation in degrees | |p5= angle: [[Number]] - trigger area rotation in degrees | ||
|p6= isRectangle: [[Boolean]] - [[true]] if rectangle | |p6= isRectangle: [[Boolean]] - [[true]] if rectangle | ||
|p7= c: [[Number]] - (Optional) trigger area Z size / 2, in meters. -1 for infinite height {{Since|arma3|1.59.135137|y}} | |p7= c: [[Number]] - (Optional) trigger area Z size / 2, in meters. -1 for infinite height {{Since|arma3|1.59.135137|y}} | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]]];</code> | |x1= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]]];</code> | ||
|x2= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]], 100];</code> | |x2= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]], 100];</code> | ||
|x3= <code>_trg = [[createTrigger]] ["EmptyDetector", [[getPos]] [[player]], [[false]]]; | |x3= <code>_trg = [[createTrigger]] ["EmptyDetector", [[getPos]] [[player]], [[false]]]; | ||
_trg [[setTriggerArea]] [5, 5, 0, [[false]]]; | _trg [[setTriggerArea]] [5, 5, 0, [[false]]]; | ||
_trg [[setTriggerActivation]] ["CIV", "PRESENT", [[true]]]; | _trg [[setTriggerActivation]] ["CIV", "PRESENT", [[true]]]; | ||
_trg [[setTriggerStatements]] ["[[this]]", "[[hint]] 'Civilian near player'", "[[hint]] 'no civilian near'"];</code> | _trg [[setTriggerStatements]] ["[[this]]", "[[hint]] 'Civilian near player'", "[[hint]] 'no civilian near'"];</code> | ||
| [[triggerArea]], [[createTrigger]], [[setTriggerActivation]], [[setTriggerStatements]], [[setTriggerText]], [[setTriggerTimeout]], [[setTriggerType]], [[inArea]], [[inAreaArray]], [[triggerInterval]], [[setTriggerInterval]], [[enableSimulation]], [[simulationEnabled]] | | [[triggerArea]], [[createTrigger]], [[setTriggerActivation]], [[setTriggerStatements]], [[setTriggerText]], [[setTriggerTimeout]], [[setTriggerType]], [[inArea]], [[inAreaArray]], [[triggerInterval]], [[setTriggerInterval]], [[enableSimulation]], [[simulationEnabled]] | ||
}} | }} | ||
Revision as of 11:12, 18 January 2021
Description
- Description:
- Defines the area monitored by the given trigger. The area could be either rectangular or elliptical.
- Groups:
- Triggers
Syntax
- Syntax:
- trigger setTriggerArea [a, b, angle, isRectangle, c]
- Parameters:
- trigger: Object - object of the type "EmptyDetector"
- [a, b, angle, isRectangle, c]: Array
- a: Number - trigger area X size / 2, in meters
- b: Number - trigger area Y size / 2, in meters
- angle: Number - trigger area rotation in degrees
- isRectangle: Boolean - true if rectangle
- c: Number - (Optional) trigger area Z size / 2, in meters. -1 for infinite height Template:Since
- Return Value:
- Nothing
Examples
- Example 1:
_trigger setTriggerArea [100, 50, 45, false];
- Example 2:
_trigger setTriggerArea [100, 50, 45, false, 100];
- Example 3:
_trg = createTrigger ["EmptyDetector", getPos player, false]; _trg setTriggerArea [5, 5, 0, false]; _trg setTriggerActivation ["CIV", "PRESENT", true]; _trg setTriggerStatements ["this", "hint 'Civilian near player'", "hint 'no civilian near'"];
Additional Information
- See also:
- triggerAreacreateTriggersetTriggerActivationsetTriggerStatementssetTriggerTextsetTriggerTimeoutsetTriggerTypeinAreainAreaArraytriggerIntervalsetTriggerIntervalenableSimulationsimulationEnabled
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Command Group: Triggers
- Scripting Commands: Local Effect
- Operation Flashpoint: Elite: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands