DCS func getCountry: Difference between revisions
From DCS World Wiki - Hoggitworld.com
m 1 revision imported |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 33: | Line 33: | ||
|optType2= | |optType2= | ||
|examples= | |examples= The following will print the name of the country to dcs.log for a unit with the name of "Tanya" | ||
local countryId = Unit.getByName('Tanya'):getCountry() | |||
local contryName = country.name[countryId] | |||
env.info(countryName) | |||
> USA | |||
|related= '''[[DCS_Class_Object| Object Class Functions:]]''' {{listofScriptingObjectFuncs}} | |related= '''[[DCS_Class_Object| Object Class Functions:]]''' {{listofScriptingObjectFuncs}} | ||
'''[[DCS_Class_Coalition_Object| Coalition Object Class Functions:]]''' {{listofScriptingCoaObjectFuncs}} | '''[[DCS_Class_Coalition_Object| Coalition Object Class Functions:]]''' {{listofScriptingCoaObjectFuncs}} | ||
| Line 42: | Line 47: | ||
}} | }} | ||
[[Category:Class Functions|getCountry]] | [[Category:Class Functions|getCountry]] | ||
[[Category:Game Patch 1.2.4|getCountry]] | |||
