DCS func getPlayerName: Difference between revisions

From DCS World Wiki - Hoggitworld.com
m 1 revision imported
 
No edit summary
 
Line 3: Line 3:
|fName= getPlayerName
|fName= getPlayerName


|vNum= 1.2.0
|vNum= 1.2.4


|par1= [[DCS_Class_Unit|Unit]]
|par1= [[DCS_Class_Unit|Unit]]
Line 41: Line 41:
}}
}}
[[Category:Class Functions|getPlayerName]]
[[Category:Class Functions|getPlayerName]]
[[Category:Game Patch 1.2.4|getPlayerName]]

Latest revision as of 00:01, 21 March 2022

Scripting Root

Envrioment: Mission Scripting
Function: getPlayerName Added with: 1.2.4
Member Of: Unit
Syntax: string Unit.getPlayerName(Class Self )
Description: Returns a string value of the name of the player if the unit is currently controlled by a player. If a unit is controlled by AI the function returns nil.


Return Value: string
Return Example: 'bob'
Examples:
Related Functions: Unit Functions: isActive, getPlayerName, getID, getNumber, getCategoryEx, getObjectID, getController, getGroup, getCallsign, getLife, getLife0, getFuel, getAmmo, getSensors, hasSensors, getRadar, getDrawArgumentValue, getNearestCargos, enableEmission, getDescentCapacity

Object Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir

Coalition Object Functions: getCoalition, getCountry

Notes: As of DCS 1.5 this function works on both ground units and aircraft.