Difference between revisions of "EMFRoleSet"

From cluster wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="padding:0.33em 2em;font-size:1.2em;font-weight:bold;display:block; border-bottom: #25A1A1 solid 1px; background-color:#E0FFFF;color:#25A1A1">Description</div>
Deprecated. See [[setRole]] instead.
 
<dl style="width:100%;">
 
<!-- DESCRIPTION -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Description:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
This function sets the team and squad role of a playerunit, due to how i use EMF in missions it is required for a lot of functions in EMF. it is recommended you run this function for each playable unit in your mission.
</div></dd>
 
<!-- EXECUTION -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Execution:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
call
</div></dd>
 
<!-- GROUPS -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Groups:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
Utility Functions: Eric's Mission Framework
</div></dd>
</dl>
 
<div style="padding:0.33em 2em;font-size:1.2em;font-weight:bold;display:block;border-bottom: #25A1A1 solid 1px; background-color:#E0FFFF;color:#25A1A1">Syntax</div>
<dl style="width:100%;">
 
<!-- SYNTAX -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Syntax:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
[unit, role, team] call '''EMF_fnc_EMFRoleSet'''
</div></dd>
 
<!-- PARAMETERS -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Parameters:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
unit: Object - Unit to affect.
</div></dd>
 
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
role: String - Unit's Squad Role as defined in the loadout whitelist.
</div></dd>
 
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
Team: Number - (Optional) Sets team. [Default: 0]
</div></dd>
 
<!-- RETURN VALUE -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Return Value:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;">
Boolean - Returns true on success.
</div></dd>
</dl>
 
<div style="padding:0.33em 2em;font-size:1.2em;font-weight:bold;display:block; border-bottom: #25A1A1 solid 1px; background-color:#E0FFFF;color:#25A1A1">Examples</div>
<dl style="width:100%;">
 
<!-- EXAMPLE -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Example 1:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><code style="border:#25A1A1 dashed 1px;display:block;">
// Set myUnit's role to "SL"
[myUnit, "SL"] call '''EMF_fnc_EMFRoleSet''';
</code></dd>
 
<!-- EXAMPLE -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Example 2:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;"><code style="border:#25A1A1 dashed 1px;display:block;">
// Set this object's role to "MED" and team to 1<br>
[this, "MED", 1] call '''EMF_fnc_EMFRoleSet''';
</code></dd>
 
</dl>
 
<div style="padding:0.33em 2em;font-size:1.2em;font-weight:bold;display:block;border-bottom: #25A1A1 solid 1px; background-color:#E0FFFF;color:#25A1A1">Additional Information</div>
<!-- ADDITIONAL INFORMATION -->
<dl style="width:100%;">
 
<!-- SEE ALSO -->
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">See also:</dt>
<dd style="width:90%;padding:.3em .3em .3em 7em;column-count:4;">
<div style="display:block;">[[SetDate]]</div>
<div style="display:block;">[[ZeusFPS]]</div>
<div style="display:block;">[[preventProne]]</div>
<div style="display:block;">[[countDown]]</div>
<div style="display:block;">[[slotLimit]]</div>
<div style="display:block;">[[notZeus]]</div>
<div style="display:block;">[[getParamValue]]</div>
<div style="display:block;">[[nearestPlayer]]</div>
</dd>
 
</dl>
 
 
<div style="padding:0.33em 2em;font-size:1.2em;font-weight:bold;display:block;border-bottom: #25A1A1 solid 1px; background-color:#E0FFFF;color:#25A1A1">Notes</div>
<!-- NOTES -->
* the variable name for unit role is: '''unitSquadRole''' <sup>(this is subject to change in the near future)</sup>
* the variable name for unit team is: '''unitTeamRole''' <sup>(this is subject to change in the near future)</sup>
 
<!-- CATEGORIES -->
[[Category:Utility Functions: Eric's Mission Framework]]
[[Category:Functions: Eric's Mission Framework]]

Latest revision as of 13:22, 26 March 2022

Deprecated. See setRole instead.