I'm trying to use the UnitTypeGetCost function ("Unit Type Cost") to return the mineral cost of a unit I made, but for some reason it keeps on returning 0.
The really interesting thing about it is that I've been able to reproduce the problem with the built-in MULE unit. Even though the editor says it has a cost of 50 minerals, if you try to get the cost using UnitTypeGetCost it returns 0. I realize that the MULE isn't a normally buildable unit, but I didn't think that would be a factor in this situation since the function simply looks at its cost property, correct?
An easy way to reproduce this would be to create a new map, create a trigger at Map Initialization to "Display (Text((Minerals cost of MULE)) and play <whatever> for (All players)". Start the map and observe that the number "0" is displayed instead of "50".
Try it with most other units and it works fine. The MULE is the only built-in unit I've noticed that it doesn't work for, but there may be others.
Am I missing something or is this a bug?
The really interesting thing about it is that I've been able to reproduce the problem with the built-in MULE unit. Even though the editor says it has a cost of 50 minerals, if you try to get the cost using UnitTypeGetCost it returns 0. I realize that the MULE isn't a normally buildable unit, but I didn't think that would be a factor in this situation since the function simply looks at its cost property, correct?
An easy way to reproduce this would be to create a new map, create a trigger at Map Initialization to "Display (Text((Minerals cost of MULE)) and play <whatever> for (All players)". Start the map and observe that the number "0" is displayed instead of "50".
Try it with most other units and it works fine. The MULE is the only built-in unit I've noticed that it doesn't work for, but there may be others.
Am I missing something or is this a bug?