squadParams: Difference between revisions

From Bohemia Interactive Community
m (note typo)
mNo edit summary
 
(46 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.18


|1.18|= Game version
|arg= global


|arg= global|= Arguments in MP
|gr1= Object Manipulation


____________________________________________________________________________________________
|gr2= System


| Returns data about squad of given unit loaded from squad.xml.<br/>
|descr= Returns data about squad of given unit loaded from [[squad.xml]] as well as the unit itself.
All items in returned array are [[String]]. |= Description
{{Feature|informative|This command returns an empty array in single player.}}
____________________________________________________________________________________________


| '''squadParams''' unit |= Syntax
|s1= [[squadParams]] unit


|p1= unit: [[Object]] |= Parameter 1
|p1= unit: [[Object]]


| [[Array]] - <nowiki>[[</nowiki>squadNick,squadName,squadEmail,squadWeb,squadPicture,squadTitle],[memberId,memberNick,memberName,memberEmail,memberIcq,memberRemark<nowiki>]]</nowiki>|= Return value
|r1= [[Array]] with [squadInfo, memberInfo, squadId, a3unitsId]
____________________________________________________________________________________________
* squadInfo: [[Array]] with [nick, name, email, web, picture, title]
 
** nick: [[String]] - squad nickname
|x1= <code>_info = [[squadParams]] [[player]];</code> |= Example 1
** name: [[String]] - squad full name
____________________________________________________________________________________________
** email: [[String]] - squad contact email
** web: [[String]] - squad website URL
** picture: [[String]] - squad picture URL
** title: [[String]] - squad title
* memberInfo: [[Array]] with [uid, name, fullname, email, icq, remark]
** uid: [[String]] - member unique ID
** name: [[String]] - member name
** fullname: [[String]] - member full name
** email: [[String]] - member email
** icq: [[String]] - member ICQ number
** remark: [[String]] - member remark
* {{GVI|arma3|2.06|size= 0.75}} squadId: [[String]] - unique squad ID
* {{GVI|arma3|2.06|size= 0.75}} a3unitsId: [[String]] - unique {{arma3}} Units  ID


| [[squad.xml]] |= See also
|x1= <sqf>_info = squadParams player;</sqf>


|x2= <sqf>squadParams player params ["_squadInfo", "_memberInfo", "_squadID", "_a3unitsID"];</sqf>
|seealso= [[squad.xml]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on July 19, 2015 - 21:43 (UTC)</dd>
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt>
<dd class="note">
Returns an empty array in singleplayer.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 10:02, 2 January 2026

Hover & click on the images for description

Description

Description:
Returns data about squad of given unit loaded from squad.xml as well as the unit itself.
This command returns an empty array in single player.
Groups:
Object ManipulationSystem

Syntax

Syntax:
squadParams unit
Parameters:
unit: Object
Return Value:
Array with [squadInfo, memberInfo, squadId, a3unitsId]
  • squadInfo: Array with [nick, name, email, web, picture, title]
    • nick: String - squad nickname
    • name: String - squad full name
    • email: String - squad contact email
    • web: String - squad website URL
    • picture: String - squad picture URL
    • title: String - squad title
  • memberInfo: Array with [uid, name, fullname, email, icq, remark]
    • uid: String - member unique ID
    • name: String - member name
    • fullname: String - member full name
    • email: String - member email
    • icq: String - member ICQ number
    • remark: String - member remark
  • Arma 3 logo black.png 2.06 squadId: String - unique squad ID
  • Arma 3 logo black.png 2.06 a3unitsId: String - unique Arma 3 Units ID

Examples

Example 1:
_info = squadParams player;
Example 2:
squadParams player params ["_squadInfo", "_memberInfo", "_squadID", "_a3unitsID"];

Additional Information

See also:
squad.xml

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note