From Bohemia Interactive Community
Hover & click on the images for description
Description
- Description:
- Returns name of a unit. Name of unit is stored in it is namespace so it can be retrieved later, mainly for when unit dies. Name is stored in the variable BIS_fnc_getName_name.
If the unit is alive, this function does name and returns the result, and saves the result to the variable on the unit. If the unit is dead, the function tries to retrieve the saved name from the variable on the unit, and returns "" if none is saved, unless forcedWhenDead is set to true.
- Execution:
- call
- Groups:
- Object Manipulation
Syntax
- Syntax:
- [object] call BIS_fnc_getName
- Parameters:
- object: Object - object whose name should be returned
- forcedWhenDead: Boolean - (Optional, default false) forces the function to do name on the unit if it's dead and has no name saved in the variable. Might have inconsistent results.
- maxCharacters: Number - (Optional, default -1) the name returned will be limited to this length. -1 for no limit. The name saved to the variable is not limited.
- Return Value:
- String - unit's name
Examples
- Example 1:
Additional Information
- See also:
- name
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here!
Add Note