[lua] bug in object generation script

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,342
Hi,

This command is bugged--instead of interpreting the passed value as an integer, it reads its ascii value. It's for changing the default team color of units.

JASS:
//this sets to the teamcolor value to 52, not 4 (yellow)
//52 is the ascii value of the character "4"
//! i makechange(current, "utco", "4")

Warcraft crashes apparently if you try to show player team colors above 12. I guess there's no way to coerce it to interpret the data as a color (like Starcraft Broodwar, where you could get extended glitchy colors by passing values between around 15-255).
 
That is because 'utco' is a custom type in the UnitMetaData.slk and the Object Merger probably treats all custom types as strings. I guess most of them are.

You can use a custom UnitMetaData.slk to change 'utco''s type to int or

JASS:
//! i makechange(current, "utco", "\4")

seems to be readable by wc3 as well.
 
Status
Not open for further replies.
Back
Top