setSide: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Text replacement - "<!-- Note Section [A-Z]+ --> " to "")
Line 28: Line 28:


<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 16:00, 3 December 2013 (CEST)</dd>
<dd class="notedate">Posted on 16:00, 3 December 2013 (CEST)</dd>
<dt class="note">[[User:Ondřejkuzel|Ondřejkuzel]]</dt>
<dt class="note">[[User:Ondřejkuzel|Ondřejkuzel]]</dt>
<dd class="note">For units, vehicles you can use: "'''[[Array|array]] [[joinSilent]] [[createGroup]] [[Side]]'''", e.g. in init: "[this] joinSilent createGroup EAST;"  ''described in the note below''
<dd class="note">For units, vehicles you can use: "'''[[Array|array]] [[joinSilent]] [[createGroup]] [[Side]]'''", e.g. in init: "[this] joinSilent createGroup EAST;"  ''described in the note below''
<!-- Note Section END -->
<dd class="notedate">Posted on 19:05, 6 August 2009 (CEST)</dd>
<dd class="notedate">Posted on 19:05, 6 August 2009 (CEST)</dd>
<dt class="note">[[User:Jtgibson|Jtgibson]]</dt>
<dt class="note">[[User:Jtgibson|Jtgibson]]</dt>
<dd class="note">This is a frequent question on OFPEC, but produced here because it was difficult to find an answer to.  '''setSide''' does not work for men, vehicles, etc.: it is intended for locations (''i.e.'', territory).  If you want to switch a unit's (''e.g.'', the player's) side in the middle of a battle, make the unit '''[[joinSilent]]''' a group on the given side instead.  If you want the unit to become the group leader after joining, use '''[[selectLeader]]'''.  I have not tested the idea of spawning a temporary unit of that side, assigning the player to that unit, setting the player as the leader, then deleting the original unit, but I don't see why it wouldn't work.  (It begs the question why we don't have a setSide object function, though.)
<dd class="note">This is a frequent question on OFPEC, but produced here because it was difficult to find an answer to.  '''setSide''' does not work for men, vehicles, etc.: it is intended for locations (''i.e.'', territory).  If you want to switch a unit's (''e.g.'', the player's) side in the middle of a battle, make the unit '''[[joinSilent]]''' a group on the given side instead.  If you want the unit to become the group leader after joining, use '''[[selectLeader]]'''.  I have not tested the idea of spawning a temporary unit of that side, assigning the player to that unit, setting the player as the leader, then deleting the original unit, but I don't see why it wouldn't work.  (It begs the question why we don't have a setSide object function, though.)
<!-- Note Section END -->
</dl>
</dl>



Revision as of 00:41, 6 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
SidesLocations

Syntax

Syntax:
Syntax needed
Parameters:
location: Location
side: Side
Return Value:
Return value needed

Examples

Example 1:
myLocation setSide resistance

Additional Information

See also:
SidesidewesteastresistanceciviliansideUnknownsideFriendlysideEnemyplayerSideside locationSide relationsindependent

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 on 16:00, 3 December 2013 (CEST)
Ondřejkuzel
For units, vehicles you can use: "array joinSilent createGroup Side", e.g. in init: "[this] joinSilent createGroup EAST;" described in the note below
Posted on 19:05, 6 August 2009 (CEST)
Jtgibson
This is a frequent question on OFPEC, but produced here because it was difficult to find an answer to. setSide does not work for men, vehicles, etc.: it is intended for locations (i.e., territory). If you want to switch a unit's (e.g., the player's) side in the middle of a battle, make the unit joinSilent a group on the given side instead. If you want the unit to become the group leader after joining, use selectLeader. I have not tested the idea of spawning a temporary unit of that side, assigning the player to that unit, setting the player as the leader, then deleting the original unit, but I don't see why it wouldn't work. (It begs the question why we don't have a setSide object function, though.)