SetRole
Jump to navigation
Jump to search
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:
Gameplay: Eric's Mission Framework
Syntax
- Syntax:
[unit, role, team] call emf_gameplay_fnc_setRole
- 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_gameplay_fnc_setRole;- Example 2:
// Set this object's role to "MED" and team to 1
[this, "MED", 1] call emf_gameplay_fnc_setRole;
Additional Information
- See also:
Notes
- the variable name for unit role is: emf_utilities_setRole_role
- the variable name for unit team is: emf_utilities_setRole_team