synchronizedObjects: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 ")
Line 27: Line 27:
|x1= <code>_objects = [[synchronizedObjects]] _logic;</code>
|x1= <code>_objects = [[synchronizedObjects]] _logic;</code>


|seealso= [[synchronizeObjectsAdd]] [[synchronizeObjectsRemove]] [[synchronizedTriggers]], [[synchronizedWaypoints]]
|seealso= [[synchronizeObjectsAdd]] [[synchronizeObjectsRemove]] [[synchronizedTriggers]] [[synchronizedWaypoints]]
}}
}}



Revision as of 19:23, 20 January 2022

Hover & click on the images for description

Description

Description:
Return the list of objects synchronized with the given unit.
Groups:
Object Manipulation

Syntax

Syntax:
synchronizedObjects unit
Parameters:
unit: Object -
Return Value:
Array

Examples

Example 1:
_objects = synchronizedObjects _logic;

Additional Information

See also:
synchronizeObjectsAdd synchronizeObjectsRemove synchronizedTriggers synchronizedWaypoints

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
Posted 07:13, 11 November 2010 (UTC)
Turrican
This command only returns the effective commander of a vehicle that is synchronized. You have to use the "vehicle" command to select the actual vehicle. This command only returns the synchronized objects when used on intelligent objects such as units or logic objects. All other objects returns an empty array. In MP this command returns only values when the object is local. otherwise it returns an empty array.
Posted on February 26, 2015 - 18:03 (UTC)
Bull A
When returning the synchronized objects, they are returned in the order that they were placed on the map
Posted on October 27, 2016 - 18:52 (UTC)
BobTheHunted
In Eden you can synchronize both units and their vehicles separately by syncing the gamelogic (or whatever) to the vehicle itself, and then the driver (or whatever other passengers) of the vehicle. To use an entire group, just sync all units within that group to the gamelogic (not just the leader or group icon). By doing this you can execute commands on each unit in a group and just the crew/single unit of a vehicle, or just the vehicle and not the crew, or both the vehicle and the crew.