setTriggerArea: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) m (see also) |
No edit summary |
||
Line 29: | Line 29: | ||
|x1= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]]];</code> |= Example 1 | |x1= <code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]]];</code> |= Example 1 | ||
|x2= Possible since Arma 3 v1.59.135137:<code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]], 100];</code> |= Example 2 | |x2= Possible since Arma 3 v1.59.135137:<code>_trigger [[setTriggerArea]] [100, 50, 45, [[false]], 100];</code> |= Example 2 | ||
|x3= <code>_trg = [[createTrigger]] ["EmptyDetector", [[getPos]] [[player]]]; | |||
_trg [[setTriggerArea]] [5, 5, 0, [[false]]]; | |||
_trg [[setTriggerActivation]] ["CIV", "PRESENT", [[true]]]; | |||
_trg [[setTriggerStatements]] ["this", "hint 'Civilian near player'", "hint 'no civilian near'"];</code>|= Example 3 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 01:14, 4 April 2019
Description
- Description:
- 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).
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 area considered infinitely tall, like in old triggers. - Groups:
- Uncategorised
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 (Optional): Number - trigger area Z size / 2, in meters (Since Arma 3 v1.59.135137)
- Return Value:
- Nothing
Examples
- Example 1:
_trigger setTriggerArea [100, 50, 45, false];
- Example 2:
- Possible since Arma 3 v1.59.135137:
_trigger setTriggerArea [100, 50, 45, false, 100];
- Example 3:
_trg = createTrigger ["EmptyDetector", getPos player]; _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:
- triggerAreacreateTriggersetTriggerActivationsetTriggerStatementssetTriggerTextsetTriggerTimeoutsetTriggerTypeinAreainAreaArray
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
Categories:
- Scripting Commands
- Introduced with Arma version 1.00
- Arma: New Scripting Commands
- Arma: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands: Local Effect
- Scripting Commands OFP Elite
- Scripting Commands ArmA
- Command Group: Activators
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters