1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[lua] bug in object generation script

Discussion in 'Warcraft Editing Tools' started by sethmachine, Jan 15, 2014.

  1. sethmachine

    sethmachine

    Joined:
    Aug 7, 2013
    Messages:
    1,318
    Resources:
    0
    Resources:
    0
    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.

    Code (vJASS):

    //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).
     
  2. WaterKnight

    WaterKnight

    Joined:
    Aug 18, 2009
    Messages:
    4,035
    Resources:
    5
    Maps:
    1
    Tutorials:
    4
    Resources:
    5
    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

    Code (vJASS):

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


    seems to be readable by wc3 as well.