- Joined
- Jul 20, 2018
- Messages
- 177
It is possible to set any color for a player using
Consider next code.
It works well if flag "Fixed Player Settings" in forces properties is not set.
But if you set this flag, everything breaks.
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.
//! 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.
But if you set this flag, everything breaks.
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.