Advertisement

Author Topic: unit type display name  (Read 460 times)

0 Members and 1 Guest are viewing this topic.

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
unit type display name
« 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

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: unit type display name
« Reply #1 on: 16 Oct 2009, 23:07:25 »
Try
Code: [Select]
getText (configFile >> "cfgVehicles" >> (typeOf player) >> "displayName")
Project MCAR   ---   FWW2 - Finland At War 1939-1945
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re: unit type display name
« Reply #2 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