setTriggerArea: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add group)
m (Add since template usage)
Line 13: Line 13:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Defines the area monitored by the given trigger. The area could be either rectangular or elliptical. Since Arma 3 v1.59.135137 it is possible to define 3 dimensional area to monitor by specifying extra param for the area height (see pic).
| [[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.
<br><br>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 <nowiki>&lt;=</nowiki> 0, the trigger area considered infinitely tall, like in old triggers. |DESCRIPTION=
{{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 &lt;{{=}} 0, the trigger's height is considered infinite like 2D triggers.}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 20: Line 21:


|p1= trigger: [[Object]] - object of the type "EmptyDetector"|PARAMETER1=
|p1= trigger: [[Object]] - object of the type "EmptyDetector"|PARAMETER1=
|p2= [a, b, angle, isRectangle, c]: [[Array]] |PARAMETER2=
|p2= [a, b, angle, isRectangle, c]: [[Array]] |PARAMETER2=
|p3= a: [[Number]] - trigger area X size / 2, in meters |PARAMETER3=
|p3= a: [[Number]] - trigger area X size / 2, in meters |PARAMETER3=
|p4= b: [[Number]] - trigger area Y size / 2, in meters |PARAMETER4=
|p4= b: [[Number]] - trigger area Y size / 2, in meters |PARAMETER4=
|p5= angle: [[Number]] - trigger area rotation in degrees |PARAMETER5=
|p5= angle: [[Number]] - trigger area rotation in degrees |PARAMETER5=
|p6= isRectangle: [[Boolean]] - [[true]] if rectangle |PARAMETER6=
|p6= isRectangle: [[Boolean]] - [[true]] if rectangle |PARAMETER6=
|p7= c (Optional): [[Number]] - trigger area Z size / 2, in meters &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (''Since Arma 3 v1.59.135137'') |PARAMETER7=


| [[Nothing]]
|p7= c: [[Number]] - (Optional) trigger area Z size / 2, in meters. -1 for infinite height {{since|arma3|1.59.135137|y}} |PARAMETER7=
<br>[[Image:setTriggerArea.jpg|300px]] |RETURNVALUE=
 
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]]];</code> |EXAMPLE1=
|x1= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]]];</code> |EXAMPLE1=
|x2= Possible since Arma 3 v1.59.135137:<code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]], 100];</code> |EXAMPLE2=
 
|x2= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]], 100];</code> |EXAMPLE2=
 
|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>|EXAMPLE3=
_trg [[setTriggerStatements]] ["[[this]]", "[[hint]] 'Civilian near player'", "[[hint]] 'no civilian near'"];</code>|EXAMPLE3=
 
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[triggerArea]], [[createTrigger]], [[setTriggerActivation]], [[setTriggerStatements]], [[setTriggerText]], [[setTriggerTimeout]], [[setTriggerType]], [[inArea]], [[inAreaArray]], [[triggerInterval]], [[setTriggerInterval]], [[enableSimulation]], [[simulationEnabled]] |SEEALSO=
| [[triggerArea]], [[createTrigger]], [[setTriggerActivation]], [[setTriggerStatements]], [[setTriggerText]], [[setTriggerTimeout]], [[setTriggerType]], [[inArea]], [[inAreaArray]], [[triggerInterval]], [[setTriggerInterval]], [[enableSimulation]], [[simulationEnabled]] |SEEALSO=
}}
}}



Revision as of 22:44, 23 December 2020

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
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.
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.
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

Notes

Bottom Section