GetUnitStringID(id))

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

GetUnitStringID(id))

Post by enric »

With GetUnitStringID(id)) we can get the name of the passed unit's id.
But when knowing the generic ID (i.e. 0 for Sherman, 1 for M10, etc.) but not the scenario unit id, how can I get the Name?
AndrewGardner
Slitherine
Slitherine
Posts: 535
Joined: Tue Nov 13, 2012 6:24 pm

Re: GetUnitStringID(id))

Post by AndrewGardner »

GetUnitStringID(id) just returns the ID column for that that unit's squad type so if you already know that value, you could use PrintStringIndexed("IDS_UNITNAME", #) or PrintString("IDS_UNITNAME#")
Post Reply

Return to “Battle Academy : Modders Corner ”