Jump to content
Sign in to follow this  
alleycat

descriptive classname of a unit?

Recommended Posts

I would like to retrieve the descriptive classname of a unit. I know how to do it for weapons:

_weapon 	= 	(configFile >> "cfgWeapons" >> _weapon);

but I am not sure how to do it for units

Share this post


Link to post
Share on other sites

Your script snippet doesn't do anything by itself, what do you mean?

Do you mean the display name?

_unit = player;
_displayName = getText (configfile >> "CfgVehicles" >> typeof _unit>> "displayName");
hint str _displayName;

Would return something similar to "Autorifleman" etc.

 

Cheers

Share this post


Link to post
Share on other sites

Yes that was exactly what I was looking for. Thanks a lot.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×