inAreaArrayIndexes: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 53: | Line 53: | ||
|s3= positions [[inAreaArrayIndexes]] [pos1, pos2, pos3,...] | |s3= positions [[inAreaArrayIndexes]] [pos1, pos2, pos3,...] | ||
|p41= positions: [[Array]] - [[Object]]s and/or [[Position]]s to check. | |p41= positions: [[Array]] - [[Object]]s and/or [[Position]]s to check. | ||
|p42 = posN: [[Position]] - | |p42 = posN: [[Position]] - polygon vertices in 2d or 3d format (see [[inPolygon]]) | ||
|r3= [[Array]]: [[Number]]s - indexes of matched positions in positions array | |r3= [[Array]]: [[Number]]s - indexes of matched positions in positions array | ||
Latest revision as of 22:37, 1 November 2024
Description
- Description:
- Returns indices of positions that are within the provided area.
- Groups:
- TriggersMarkersLocationsPositionsGroups
Syntax 1
- Syntax:
- positions inAreaArrayIndexes area
- Parameters:
- positions: Array of Objects and/or Positions
- area: Object, Location or String - the defined area:
- Return Value:
- Array: Numbers - indexes of matched positions in positions array
Syntax 2
- Syntax:
- positions inAreaArrayIndexes [centre, a, b, angle, isRectangle, c, usePosWorld]
- Parameters:
- positions: Array - Objects and/or Positions to check (see note in description)
- centre: Array - Position Object or Group (see note in description)
- a: Number - x axis (x / 2)
- b: Number - y axis (y / 2)
- angle: Number - (Optional, default 0) rotation angle
- isRectangle: Boolean - (Optional, default false) true if rectangle, false if ellipse
- c: Number - (Optional, default -1: unlimited) z axis (z / 2)
- since 2.20
- usePosWorld: Boolean - (Optional, default false) set to true to treat all positions as PositionWorld
- Return Value:
- Array: Numbers - indexes of matched positions in positions array
Syntax 3
- Syntax:
- positions inAreaArrayIndexes [pos1, pos2, pos3,...]
- Parameters:
- positions: Array - Objects and/or Positions to check.
- posN: Position - polygon vertices in 2d or 3d format (see inPolygon)
- Return Value:
- Array: Numbers - indexes of matched positions in positions array
Examples
- Example 1:
Additional Information
- See also:
- inAreaArray inArea triggerArea
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