BIS fnc inTrigger: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 62: | Line 62: | ||
As of ["Arma 3","Arma3",152,132676,"Stable",true] this command is still broken if checking against markers that have axisB larger axisA. | As of ["Arma 3","Arma3",152,132676,"Stable",true] this command is still broken if checking against markers that have axisB larger axisA. | ||
To get around this if needed you can create your marker with the largest radius in axisA and rotate your marker by 90degrees. | To get around this if needed you can create your marker with the largest radius in axisA and rotate your marker by 90degrees. | ||
</dd> | |||
</dl> | |||
<!-- DISCONTINUE Notes --> | |||
<!-- CONTINUE Notes --> | |||
<dl class="command_description"> | |||
<dd class="notedate">Posted on October 4, 2015 - 11:22 (UTC)</dd> | |||
<dt class="note">[[User:Larrow|Larrow]]</dt> | |||
<dd class="note"> | |||
Also works with [ pos, radius ] | |||
<code>[ [position, radius], player ] call BIS_fnc_inTrigger</code> | |||
</dd> | </dd> | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 13:23, 4 October 2015
Description
- Description:
- Detects whether a position is within the trigger area of the given trigger.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [trigger, position, (isScalar)] call BIS_fnc_inTrigger
- Parameters:
- trigger: Object or Array - Trigger or trigger area
- position: Object or Array - reference object (e.g. player) or Position
- isScalar (Optional): Boolean - true for scalar result [default: false]
- Return Value:
- Boolean - true when position is in trigger area, false otherwise
Number - distance from border if isScalar is true
Examples
- Example 1:
_trigger = createTrigger ["EmptyDetector", getPosATL player]; _trigger setTriggerArea [10, 10, 0, false]; _inTrigger = [_trigger, player] call BIS_fnc_inTrigger; //_inTrigger = true
Additional Information
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
- Posted on May 6, 2015 - 19:34 (UTC)
- Killzone Kid
-
Works with markers too:
inMarker = ["markername", _position] call BIS_fnc_inTrigger;
- Posted on October 4, 2015 - 11:14 (UTC)
- Larrow
- As of ["Arma 3","Arma3",152,132676,"Stable",true] this command is still broken if checking against markers that have axisB larger axisA. To get around this if needed you can create your marker with the largest radius in axisA and rotate your marker by 90degrees.
- Posted on October 4, 2015 - 11:22 (UTC)
- Larrow
-
Also works with [ pos, radius ]
[ [position, radius], player ] call BIS_fnc_inTrigger