HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit-Types

02-08-2004, 08:00 PM#1
R3N3G4D3
Custom units have very annoying unit-type names like custom_h00d where I'm guessing "h" means that it's a building and 00d means that it's 13th custom unit under that category (hex). The problem is that I need the game to be able to easily calculate the name of the upgrade of unit from the unit's custom name and upgrade to that unit when I tell it to without using 20,000 if statements (because I have a lot of units). The problem is that although the editor works with hex values it has no easy way of converting between them and decimals. So what I decided to do is write a hex converter using triggers. But I was wondering if I could somehow rename the names of custom units to make it easier for myself and those who play this map under heavy lag. So if I was able to name unit-type of a unit to "name" and then its upgrade to "uname" that would be nice because then I could use Convert string to Unit-Type("u"+String(Unit-Type of Triggering Unit)).