Jump to content

Recommended Posts

Hello!

 

Im looking for a command that gives the class type of a unit.

Here is an example:

hint format ["Hello %1, my name is %2 %3, what do you want?", name _caller, rank _unit, name _unit];

It then says: Hello Skanda, my name is SEARGEANT Michaels, what do you want?

 

But i would like to have the class of the unit exported. In this case this is an Officer, but it could be a Grenadier or Medic or what ever Soldierclass.

It should say: Hello Skanda, my name is Officer Michaels, what do you want?

 

So I am looking for a variable that returns the classtype, not the classname or the name.

 

Thank you for your help.

Skanda

 

 

Share this post


Link to post
Share on other sites

(getText (configFile >> "CfgVehicles" >> (typeof _veh) >> "displayName")) works for vehicles, units should be similar/the same.

Share this post


Link to post
Share on other sites

_role = getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "displayName");

hint format ["Hello %1, my name is %2 %3, what do you want?", name _caller, _role, name _unit];

 

too late

Edited by Lucullus

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  

×