Difference between revisions of "EMFRoleSet"
Jump to navigation
Jump to search
Line 78: | Line 78: | ||
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">See also:</dt> | <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;"> | <dd style="width:90%;padding:.3em .3em .3em 7em;column-count:4;"> | ||
<div style="display:block;">[[SetDate]]</div> | |||
</dd> | </dd> | ||
Revision as of 19:33, 15 June 2021
Description
- 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
- 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
- Example 1:
// Set myUnit's role to "SL" [myUnit, "SL"] call EMF_fnc_EMFRoleSet;
- Example 1:
// Set this object's role to "MED" and team to 1
[this, "MED", 1] call EMF_fnc_EMFRoleSet;
Additional Information
- See also:
Notes
- the variable name for unit role is: unitSquadRole (this is subject to change in the near future)
- the variable name for unit team is: unitTeamRole (this is subject to change in the near future)