Difference between revisions of "EMFRoleSet"
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
<dt style="clear:both;font-weight:bold;position:absolute;padding:.3em;">Syntax:</dt> | <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;"> | <dd style="width:90%;padding:.3em .3em .3em 7em;"><div style="display:block;"> | ||
[unit, role, team] call ''' | [unit, role, team] call '''emf_gameplay_fnc_setRole''' | ||
</div></dd> | </div></dd> | ||
Line 59: | Line 59: | ||
<dd style="width:90%;padding:.3em .3em .3em 7em;"><code style="border:#25A1A1 dashed 1px;display:block;"> | <dd style="width:90%;padding:.3em .3em .3em 7em;"><code style="border:#25A1A1 dashed 1px;display:block;"> | ||
// Set myUnit's role to "SL"<br> | // Set myUnit's role to "SL"<br> | ||
[myUnit, "SL"] call ''' | [myUnit, "SL"] call '''emf_gameplay_fnc_setRole'''; | ||
</code></dd> | </code></dd> | ||
Line 93: | Line 93: | ||
<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> | <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 --> | <!-- NOTES --> | ||
* the variable name for unit role is: ''' | * the variable name for unit role is: '''emf_utilities_setRole_role''' | ||
* the variable name for unit team is: ''' | * the variable name for unit team is: '''emf_utilities_setRole_team''' | ||
<!-- CATEGORIES --> | <!-- CATEGORIES --> | ||
[[Category: | [[Category:Gameplay Functions: Eric's Mission Framework]] | ||
[[Category:Functions: Eric's Mission Framework]] | [[Category:Functions: Eric's Mission Framework]] |
Revision as of 13:20, 26 March 2022
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_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_fnc_EMFRoleSet;
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