roleDescription: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.48


|1.48|Game version=
|gr1= Object Manipulation


|gr1= Object Manipulation |GROUP1=
|gr2= Multiplayer


|gr2= Multiplayer |GROUP2=
|descr= Returns unit description set in the editor and visible on role selection screen in multiplayer.
____________________________________________________________________________________________


| Returns unit description set in Editor and visible on role selection screen in MP. Works in MP and SP.|DESCRIPTION=
|pr= '''Does not''' work in single player.
____________________________________________________________________________________________


| '''roleDescription''' unit |SYNTAX=
|s1= [[roleDescription]] unit


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


| [[String]] |RETURNVALUE=
|r1= [[String]]


|x1= <code>_playerRole = [[roleDescription]] [[player]];</code>|EXAMPLE1=
|x1= <sqf>_playerRole = roleDescription player;</sqf>
____________________________________________________________________________________________


| [[name]], [[getPlayerUID]], [[vehicleVarName]], [[worldName]], [[briefingName]], [[missionName]], [[serverName]]|SEEALSO=
|seealso= [[name]] [[getPlayerUID]] [[vehicleVarName]] [[worldName]] [[briefingName]] [[missionName]] [[serverName]]
}}


{{Note
|user= Killzone_Kid
|timestamp= 20150629120500
|text= One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is [[roleDescription]].
}}
}}


<h3 style="display:none">Notes</h3>
{{Note
<dl class="command_description">
|user= Pierre MGI
 
|timestamp= 20170526011000
</dl>
|text= [[roleDescription]] works for playableUnits only. That means not on AI disabled in lobby and not in SP (even for player).
 
}}
<h3 style="display:none">Bottom Section</h3>
[[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 June 29, 2015 - 12:05 (UTC)</dd>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dd class="note">
One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is [[roleDescription]].
</dd>
</dl>
<dl class="command_description">
<dd class="notedate">Posted on May 26, 2017 - 01:10 (UTC)</dd>
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
<dd class="note">
[[roleDescription]] works for playableUnits only. That means not on AI disabled in lobby and not in SP (even for player).
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 00:46, 22 July 2022

Hover & click on the images for description

Description

Description:
Returns unit description set in the editor and visible on role selection screen in multiplayer.
Problems:
Does not work in single player.
Groups:
Object ManipulationMultiplayer

Syntax

Syntax:
roleDescription unit
Parameters:
unit: Object
Return Value:
String

Examples

Example 1:
_playerRole = roleDescription player;

Additional Information

See also:
name getPlayerUID vehicleVarName worldName briefingName missionName serverName

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
Killzone_Kid - c
Posted on Jun 29, 2015 - 12:05 (UTC)
One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is roleDescription.
Pierre MGI - c
Posted on May 26, 2017 - 01:10 (UTC)
roleDescription works for playableUnits only. That means not on AI disabled in lobby and not in SP (even for player).