attachedObjects: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("serv...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.14 | |1.14 | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
| Returns a list of objects attached to the given object. | | Returns a list of objects attached to the given object. | ||
| '''attachedObjects''' obj | | '''attachedObjects''' obj | ||
|p1= obj: [[Object]] - given object | |p1= obj: [[Object]] - given object | ||
| [[Array]] of [[Object]]s attached to the given object | | [[Array]] of [[Object]]s attached to the given object | ||
|x1= <code>{ | |x1= <code>{ | ||
[[detach]] _x; | [[detach]] _x; | ||
} [[forEach]] [[attachedObjects]] [[player]];</code> | } [[forEach]] [[attachedObjects]] [[player]];</code> | ||
|x2= <code>[[if]] ([[count]] [[attachedObjects]] [[player]] == 0) [[then]] { | |x2= <code>[[if]] ([[count]] [[attachedObjects]] [[player]] == 0) [[then]] { | ||
[[hint]] "There are no objects attached to player"; | [[hint]] "There are no objects attached to player"; | ||
};</code> | };</code> | ||
| [[attachObject]], [[attachTo]], [[attachedTo]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[lightAttachObject]], [[triggerAttachVehicle]], [[attachedObject]], [[detach]] | | [[attachObject]], [[attachTo]], [[attachedTo]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[lightAttachObject]], [[triggerAttachVehicle]], [[attachedObject]], [[detach]] | ||
}} | }} |
Revision as of 00:02, 18 January 2021
Description
- Description:
- Returns a list of objects attached to the given object.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- attachedObjects obj
- Parameters:
- obj: Object - given object
- Return Value:
- Array of Objects attached to the given object
Examples
- Example 1:
{ detach _x; } forEach attachedObjects player;
- Example 2:
if (count attachedObjects player == 0) then { hint "There are no objects attached to player"; };
Additional Information
- See also:
- attachObjectattachToattachedTowaypointAttachVehiclewaypointAttachedVehiclelightAttachObjecttriggerAttachVehicleattachedObjectdetach
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