setTriggerArea: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 33: | Line 33: | ||
|p1= trigger: [[Object]] - object of the type "EmptyDetector" | |p1= trigger: [[Object]] - object of the type "EmptyDetector" | ||
|p2= | |p2= a: [[Number]] - trigger area X size / 2, in meters | ||
|p3= | |p3= b: [[Number]] - trigger area Y size / 2, in meters | ||
|p4= | |p4= angle: [[Number]] - trigger area rotation in degrees | ||
|p5= | |p5= isRectangle: [[Boolean]] - [[true]] if rectangle | ||
|p6 | |p6= c: [[Number]] - (Optional, default -1) trigger area Z size / 2, in meters. -1 for infinite height | ||
|p6since= arma3 1.60 | |||
| | |||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
Line 52: | Line 50: | ||
|x2= <sqf>_trigger setTriggerArea [100, 50, 45, false, 100];</sqf> | |x2= <sqf>_trigger setTriggerArea [100, 50, 45, false, 100];</sqf> | ||
|x3= <sqf>_trg = createTrigger ["EmptyDetector", getPos player, false]; | |x3= <sqf> | ||
_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'"];</sqf> | _trg setTriggerStatements ["this", "hint 'Civilian near player'", "hint 'no civilian near'"]; | ||
</sqf> | |||
|seealso= [[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]] | ||
}} | }} |
Revision as of 15:49, 15 August 2022
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: 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
- since 1.60
- c: Number - (Optional, default -1) trigger area Z size / 2, in meters. -1 for infinite height
- Return Value:
- Nothing
Examples
- Example 1:
- Example 2:
- 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:
- triggerArea createTrigger setTriggerActivation setTriggerStatements setTriggerText setTriggerTimeout setTriggerType inArea inAreaArray triggerInterval setTriggerInterval enableSimulation simulationEnabled
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 Operation Flashpoint: Elite version 1.00
- Operation Flashpoint: Elite: New Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Triggers
- Scripting Commands: Local Effect