{"name":"BIS_fnc_getName","operator":null,"title":"BIS fnc getName","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_getName","revid":378438,"updated":"2026-04-12T00:54:47Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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**.\n\nIf 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.","syntaxes":[{"syntax":"[object] call BIS_fnc_getName","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":"object whose name should be returned","types":["Object"],"since":null,"text":"object: Object - object whose name should be returned"},{"name":"forcedWhenDead","type":"Boolean","optional":true,"default":"false","description":"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.","types":["Boolean"],"since":null,"text":"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."},{"name":"maxCharacters","type":"Number","optional":true,"default":"-1","description":"the name returned will be limited to this length. -1 for no limit. The name saved to the variable is not limited.","types":["Number"],"since":null,"text":"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."}],"returns":{"type":"String","types":["String"],"description":"unit's name","text":"String - unit's name"}}],"examples":[{"text":"```sqf\n[player] call BIS_fnc_getName;\n```","code":["[player] call BIS_fnc_getName;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["name"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Object Manipulation","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}