synchronizedObjects: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (Text replacement - "\| *p([0-9]+) *=([^↵]+) -↵" to "|p$1=$2")
 
(49 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
|version2= 1.50


|arg= local |= Arguments in MP
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| Return the list of objects synchronized with the given unit. |DESCRIPTION=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| '''synchronizedObjects''' unit |SYNTAX=
|arg= local


|p1= unit: [[Object]] -  |PARAMETER1=
|gr1= Object Manipulation


|p2= |PARAMETER2=  
|descr= Return the list of objects synchronized with the given unit.


|p3= |PARAMETER3=  
|s1= [[synchronizedObjects]] unit


| [[Array]] |RETURNVALUE=  
|p1= unit: [[Object]]
|r1= [[Array]]


|x1= <sqf>_objects = synchronizedObjects _logic;</sqf>


|x1= <code>_objects = [[synchronizedObjects]] _logic;</code> |EXAMPLE1=
|seealso= [[synchronizeObjectsAdd]] [[synchronizeObjectsRemove]] [[synchronizedTriggers]] [[synchronizedWaypoints]]
 
____________________________________________________________________________________________
 
| [[synchronizeObjectsAdd]], [[synchronizeObjectsRemove]], [[synchronizedTriggers]], [[synchronizedWaypoints]] |SEEALSO=
 
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}


<h3 style='display:none'>Notes</h3>
<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted 07:13, 11 November 2010 (UTC)</dd>
<dd class="notedate">Posted 07:13, 11 November 2010 (UTC)</dd>
<dt class="note">[[User:Turrican|Turrican]]</dt>
<dt class="note">[[User:Turrican|Turrican]]</dt>
<dd class="note">
<dd class="note">
<!-- Note Section BEGIN -->
This command only returns the effective commander of a vehicle that is synchronized. You have to use the "vehicle"
This command only returns the LEADER of a vehicle that is synchronized. You have to use the "vehicle"
command to select the actual vehicle.
command to select the actual vehicle.


Line 46: Line 42:


In MP this command returns only values when the object is local. otherwise it returns an empty array.
In MP this command returns only values when the object is local. otherwise it returns an empty array.
<!-- Note Section END -->
</dd>
</dd>
</dl>


<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<dt></dt>
<dl class="command_description">
<dd class="notedate">Posted on 2015-02-26 - 18:03 (UTC)</dd>
<dd class="notedate">Posted on February 26, 2015 - 18:03 (UTC)</dd>
<dt class="note">[[User:Bull A|Bull A]]</dt>
<dt class="note">[[User:Bull A|Bull A]]</dt>
<dd class="note">
<dd class="note">
When returning the synchronized objects, they are returned in the order that they were placed on the map
When returning the synchronized objects, they are returned in the order that they were placed on the map
</dd>
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
<dt><dt>
<dl class="command_description">
<dd class="notedate">Posted on 2016-10-27 - 18:52 (UTC)</dd>
<dd class="notedate">Posted on October 27, 2016 - 18:52 (UTC)</dd>
<dt class="note">[[User:BobTheHunted|BobTheHunted]]</dt>
<dt class="note">[[User:BobTheHunted|BobTheHunted]]</dt>
<dd class="note">
<dd class="note">
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.
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.
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 12:51, 26 March 2024

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 2015-02-26 - 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 2016-10-27 - 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.