Difference between revisions of "EMFRoleSet"

From cluster wiki
Jump to navigation Jump to search
(Created page with "=== Description === {| class="wikitable" !Description: |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 o...")
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Description ===
Deprecated. See [[setRole]] instead.
{| class="wikitable"
!Description:
|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.
|-
!Execution:
|call
|-
!Groups:
|Utility Functions: Eric's Mission Framework
|}
 
=== Syntax ===
{| class="wikitable"
!Syntax:
|[unit, role, team] call '''EMF_fnc_EMFRoleSet'''
|-
!Parameters:
|unit: Object - Unit to affect.
 
role: String - Unit's Squad Role as defined in the loadout whitelist.
 
Team: Number - (Optional) Sets team. [Default: 0]
|-
!Return Value:
|Boolean - Returns true on success.
|}
 
=== Examples ===
{| class="wikitable"
|// Set myUnit's role to "SL"
[myUnit, "SL"] call EMF_fnc_EMFRoleSet;
|-
|// Set this object's role to "MED" and team to 1
 
[this, "MED", 1] call EMF_fnc_EMFRoleSet;
|}
 
=== 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>
 
{| class="wikitable"
|+
|}

Latest revision as of 13:22, 26 March 2022

Deprecated. See setRole instead.