• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[lua] bug in object generation script

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
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).
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
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.
Top