nearSupplies: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Add alternative syntax)
 
(47 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 0.50


|0.50|= Game version
|gr1= Object Detection
____________________________________________________________________________________________


| Find supplies in the circle with given radius. If typeName is given, only supplies of given type (or its subtype) are listed.  |= Description
|descr= Find supplies (weapon holders, ammo crates, fuel feeds, other units) in the sphere with given radius.
____________________________________________________________________________________________


| pos '''nearSupplies''' radius ''or'' [typeName, radius] |= Syntax
|s1= origin [[nearSupplies]] radius


|p1= pos: [[Position]] |= PARAMETER1
|p1= origin: [[Object]] or [[Array]] in format [[Position#PositionAGL|PositionAGL]] or [[Position#Introduction|Position2D]]


|p2= [typeName, radius]: [[Array]] |= PARAMETER2
|p2= radius: [[Number]]


|p3= typeName: [[String]] |= PARAMETER3
|r1= [[Array]] of [[Object]]s


|p4= radius: [[Number]] |= PARAMETER4
|s2= origin [[nearSupplies]] [typeName, radius]


| [[Array]] |= RETURNVALUE
|p21= origin: [[Object]] or [[Array]] in format [[Position#PositionAGL|PositionAGL]] or [[Position#Introduction|Position2D]]


|p22= typeName: [[String]]


|x1= <code>_list = ([[position]] [[player]]) [[nearSupplies]] 50;</code>|= EXAMPLE1
|p23= radius: [[Number]]


____________________________________________________________________________________________
|r2= [[Array]] of [[Object]]s


| [[findNearestEnemy]], [[nearestBuilding]], [[nearestObject]], [[nearestObjects]], [[nearObjects]], [[nearestLocation]], [[nearEntities]], [[nearTargets]],  [[nearestLocationWithDubbing]], [[nearObjectsReady]], [[nearRoads]] |= SEEALSO
|x1= <sqf>_list = player nearSupplies 50;</sqf>


| |= MPBEHAVIOUR
|seealso= [[findNearestEnemy]] [[nearestBuilding]] [[nearestObject]] [[nearestObjects]] [[nearObjects]] [[nearestLocation]] [[nearEntities]] [[nearTargets]] [[nearestLocationWithDubbing]] [[nearObjectsReady]] [[nearRoads]] [[nearestMines]] [[getCorpse]]
____________________________________________________________________________________________
}}
 
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
 
<!-- Note Section END -->
</dl>
 
<h3 style='display:none'>Bottom Section</h3>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Arma 3: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
{{subst:Add new note/construct|
<!--
* Replace from here (including the arrow just above)
 
* Please add your note here, replacing these comments
* Please '''PREVIEW YOUR ADDITION BEFORE SAVING'''
* Thank you
 
* Equal symbols "=" should be added as "{{subst:=}}" (excluding quotes)
* Pipes "|" should be added as "{{subst:!}}" (excluding quotes)
* New lines should be forced by the use of "<br>" tags
* Examples should be placed between tags <code>_like {{subst:=}} [[_this]];</code>
 
* Replace to here (including the arrow just below)
Doesn't seem to work in (position player) nearSupplies [typeName,radius] version.
}}
}}

Latest revision as of 21:17, 4 September 2022

Hover & click on the images for description

Description

Description:
Find supplies (weapon holders, ammo crates, fuel feeds, other units) in the sphere with given radius.
Groups:
Object Detection

Syntax

Syntax:
origin nearSupplies radius
Parameters:
origin: Object or Array in format PositionAGL or Position2D
radius: Number
Return Value:
Array of Objects

Alternative Syntax

Syntax:
origin nearSupplies [typeName, radius]
Parameters:
origin: Object or Array in format PositionAGL or Position2D
typeName: String
radius: Number
Return Value:
Array of Objects

Examples

Example 1:
_list = player nearSupplies 50;

Additional Information

See also:
findNearestEnemy nearestBuilding nearestObject nearestObjects nearObjects nearestLocation nearEntities nearTargets nearestLocationWithDubbing nearObjectsReady nearRoads nearestMines getCorpse

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