Difference between revisions of "allSimpleObjects"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command|=" to "{{Command|Comments=")
m (Some wiki formatting)
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
+
{{RV|type=command
____________________________________________________________________________________________
 
|arma3 |= Game
 
|1.68|Game Version=
 
|arg=  |Multiplayer Arguments=
 
|eff=  |Multiplayer Effects=
 
____________________________________________________________________________________________
 
| Returns array of all simple objects that belong to the listed class names. If the array of types is empty [], all simple objects are returned including those without class name.<br><br>
 
{{Informative |There is no inheritance in simple objects, so only exact class match is allowed. ''className'' is not case sensitive}} |DESCRIPTION=
 
____________________________________________________________________________________________
 
| '''allSimpleObjects''' [className1, className2,...classNameN] |SYNTAX=
 
|p1= [className1, className2,...classNameN]: [[Array]] |PARAMETER1=
 
|p2=  className: [[String]] - simple object class name to return. Use [] to return all simple objects|PARAMETER2=
 
  
| [[Array]] - array of [[createSimpleObject|simple objects]] |RETURNVALUE=
+
|game1= arma3
|x1= <code>[[allSimpleObjects]] ["Box_NATO_Equip_F", "Land_CampingChair_V2_F"];</code> |EXAMPLE1=
+
|version1= 1.68
|x2= <code>_allSimpleObjects = [[allSimpleObjects]] [];</code> |EXAMPLE1=
+
 
| [[createSimpleObject]], [[isSimpleObject]], [[nearestObjects]], [[nearObjectsReady]], [[nearObjects]], [[nearestObject]], [[createVehicle]] |SEEALSO=
+
|gr1= Object Detection
 +
 
 +
|descr= Returns array of all simple objects that belong to the listed class names. If the array of types is empty [], all simple objects are returned including those without class name.
 +
{{Feature|informative|
 +
* There is no inheritance in simple objects, so only exact class match is allowed.
 +
* ''className'' is not case sensitive.
 
}}
 
}}
  
<dl class='command_description'>
+
|s1= [[allSimpleObjects]] classes
  
</dl>
+
|p1= classes: [[Array]] of [[String]]s - classnames array. Use {{hl|[]}} to return all simple objects
  
<h3 style='display:none'>Bottom Section</h3>
+
|r1= [[Array]] - array of [[createSimpleObject|simple objects]]
<!-- Appropriate categories go here -->
 
  
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
+
|x1= <sqf>private _boxesAndChairs = allSimpleObjects ["Box_NATO_Equip_F", "Land_CampingChair_V2_F"];</sqf>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
+
 
 +
|x2= <sqf>private _allSimpleObjects = allSimpleObjects [];</sqf>
 +
 
 +
|seealso= [[createSimpleObject]] [[isSimpleObject]] [[nearestObjects]] [[nearObjectsReady]] [[nearObjects]] [[nearestObject]] [[createVehicle]]
 +
}}

Latest revision as of 15:12, 22 April 2022

Hover & click on the images for description

Description

Description:
Returns array of all simple objects that belong to the listed class names. If the array of types is empty [], all simple objects are returned including those without class name.
  • There is no inheritance in simple objects, so only exact class match is allowed.
  • className is not case sensitive.
Groups:
Object Detection

Syntax

Syntax:
allSimpleObjects classes
Parameters:
classes: Array of Strings - classnames array. Use [] to return all simple objects
Return Value:
Array - array of simple objects

Examples

Example 1:
private _boxesAndChairs = allSimpleObjects ["Box_NATO_Equip_F", "Land_CampingChair_V2_F"];
Example 2:
private _allSimpleObjects = allSimpleObjects [];

Additional Information

See also:
createSimpleObject isSimpleObject nearestObjects nearObjectsReady nearObjects nearestObject createVehicle

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