OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: alimag on 16 Oct 2009, 22:10:49

Title: unit type display name
Post by: alimag on 16 Oct 2009, 22:10:49
Hi,

I wonder if anyone can tell me how to find the display name of a unit type. You know, the string that is displayed when your cursor is on an unit on the screen (Rifleman, etc.)

I suspect it as something to do with config entry but after trying a lot of combinations nothing worked.

For example, I've tried (configFile >> "cfgVehicles" >> (typeOf player)) but it just returns the typeOf player, which in this case is "FR_TL".

(configFile >> "cfgVehicles" >> (typeOf player) >> "displayName") just return the string "dispalyName".

What I want is the dispaly name of the type.

Thanks in advance

Cheers
Title: Re: unit type display name
Post by: h- on 16 Oct 2009, 23:07:25
Try
Code: [Select]
getText (configFile >> "cfgVehicles" >> (typeOf player) >> "displayName")
Title: Re: unit type display name
Post by: alimag on 16 Oct 2009, 23:25:12
Hi h-,

You're spot on !

It's exactly what I was looking for.

Thanks for the quick reply.

Man I love this forum...

Cheers