• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Preparing menu color bug

Status
Not open for further replies.
Level 9
Joined
Jul 20, 2018
Messages
177
It is possible to set any color for a player using //! inject config in preparing menu. But there is a problem.

Consider next code.
JASS:
//! textmacro InitPlayer takes i, team, color
    set p = Player($i$)
    call DefineStartLocation($i$, 0., 0.)
    call SetPlayerStartLocation(p, $i$)
    call SetPlayerColor(p, ConvertPlayerColor($color$))
    call SetPlayerRacePreference(p, RACE_PREF_RANDOM)
    call SetPlayerRaceSelectable(p, true)
    call SetPlayerController(p, MAP_CONTROL_USER)
    call SetPlayerTeam(p, $team$)
//! endtextmacro

//! inject config
    local player p
    call SetMapName("TRIGSTR_001")
    call SetMapDescription("TRIGSTR_003")
    call SetPlayers(10)
    call SetTeams(1)
//! runtextmacro InitPlayer("0", "0", "1")
//! runtextmacro InitPlayer("1", "0", "2")
//! runtextmacro InitPlayer("2", "0", "3")
//! runtextmacro InitPlayer("3", "0", "4")
//! runtextmacro InitPlayer("4", "0", "5")
//! runtextmacro InitPlayer("5", "0", "6")
//! runtextmacro InitPlayer("6", "0", "7")
//! runtextmacro InitPlayer("7", "0", "8")
//! runtextmacro InitPlayer("8", "0", "9")
//! runtextmacro InitPlayer("9", "0", "11")
    set p = null
//! endinject

It works well if flag "Fixed Player Settings" in forces properties is not set.
%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-44-png.314694
upload_2019-1-26_18-15-12-png.314693

But if you set this flag, everything breaks.
upload_2019-1-26_18-24-3-png.314695
First player must have blue color, but have cyan instead. And so on. The last 2 players have the same color.


Tested on 1.30.4 patch (the latest for now).

Test maps:
Without flag.
With flag.


A little question: where is the appropriate place for bug reporting? Official forum has only general discussion thread, and that thread is not good for bug reporting.
 

Attachments

  • upload_2019-1-26_18-15-12.png
    upload_2019-1-26_18-15-12.png
    759 KB · Views: 435
  • Снимок 44.PNG
    Снимок 44.PNG
    17.8 KB · Views: 382
  • upload_2019-1-26_18-24-3.png
    upload_2019-1-26_18-24-3.png
    791.9 KB · Views: 468
  • MenuColorSettings no fixed settings.w3m
    8 KB · Views: 197
  • MenuColorSettings.w3m
    7.9 KB · Views: 203
Status
Not open for further replies.
Top