Player Colors?

bLu3_eYeS

New Member
Reaction score
31
It's what i currently know.What about the others ? Does some one know ?:)
Trigger:
  • Define Colors
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Colors[1] = |c00ff0000
      • Set Player_Colors[2] = |c000000ff
      • Set Player_Colors[3] = |c0000ffff
      • Set Player_Colors[4] = |c00800080

Or what i got at the moment , is at last good ?
 
Red: |CFFFF0303 |R (255,3,3)
Blue: |CFF0042FF |R (0,66,255)
Teal: |CFF1CB619 |R (28,230,185)
Purple: |CFF540081 |R (80,0,129)
Yellow: |CFFFFFF01 |R (255,255,1)
Orange: |CFFFE8A0E |R (254,138,14)
Green: |CFF20C000 |R (32,192,0)
Pink: |CFFE55BB0 |R (229,91,176)
Grey: |CFF959697 |R (149,150,151)
Light Blue: |CFF7EBFF1 |R (126,191,241)
Dark Green: |CFF106246 |R (16,98,70)
Brown: |CFF4E2A04 |R (74,42,4)

Cred to: Whoever wrote it. Random link on google.
 
|cffff0303

|cff0042ff

|cff1cb619

|cff540081

|cffffff01

|cfffe8a0e

|cff20c000

|cffe55bb0

|cff959697

|cff7ebff1

|cff106246

|cff4e2a04

EDIT: awh he beat me to it lol on the same minute also =)
 
Ah, player colors. I had so many plans to create interesting and crazy color and string systems, but I never finished any.

If you look at this post, you'll see stringColor by Darthfett.

Examine this part of his code...

JASS:
//globals
    constant string P_RED       = "|cffff0303"
    constant string P_BLUE      = "|cff0042ff"
    constant string P_TEAL      = "|cff1ce6b9"
    constant string P_PURPLE    = "|cff540081"
    constant string P_YELLOW    = "|cfffffc01" 
    constant string P_ORANGE    = "|cfffeba0e"
    constant string P_GREEN     = "|cff20c000"
    constant string P_PINK      = "|cffr55bb0"
    constant string P_GRAY      = "|cff959697"
    constant string P_LIGHTBLUE = "|cff7ebff1"
    constant string P_DARKGREEN = "|cff107246"
    constant string P_BROWN     = "|cff4e2a04"


Just ignore the [ljass]constant string P_[/ljass] prefix, and just look at the [ljass]COLOR = "|cff######"[/ljass] part. Or, optionally, use this library with vJASS.

More interestingly, if you want, you could create your own Jass library to use on the fly.

JASS:
//globals
    constant string P_RED       = "|cffff0303"
    constant string P_BLUE      = "|cff0042ff"
    constant string P_TEAL      = "|cff1ce6b9"
    constant string P_PURPLE    = "|cff540081"
    constant string P_YELLOW    = "|cfffffc01" 
    constant string P_ORANGE    = "|cfffeba0e"
    constant string P_GREEN     = "|cff20c000"
    constant string P_PINK      = "|cffr55bb0"
    constant string P_GRAY      = "|cff959697"
    constant string P_LIGHTBLUE = "|cff7ebff1"
    constant string P_DARKGREEN = "|cff107246"
    constant string P_BROWN     = "|cff4e2a04"

 function colorize takes string color, string str returns string
     if StringCase(color,false) == red then
       return P_RED+str+"|R"
     endif
     return ""
 endfunction


Then making a colored string would be simple as [ljass]call BJDebugMsg(colorize("This will be in red","red"))[/ljass].

In theory, a system similar to this would be possible in GUI, I think. Of course, you could just use that Jass Library and custom scripts, but this would also work.

Trigger:
  • Init
    • Events
    • Conditions
    • Actions
      • Set Red_Colorizer[1] = |cffFF0000
      • Set Red_Colorizer[3] = |R


Trigger:
  • Example
    • Events
      • Player - Player 1 (Red) types a chat message containing Hurrah! as An exact match
    • Conditions
    • Actions
      • Set Red_Colorizer[2] = Lolol
      • Game - Display to (All players) the text: (Red_Colorizer[1] + (Red_Colorizer[2] + Red_Colorizer[3]))


Interestingly, you could use 'real' variables to create a system of events to create colors.

Edit: Now that I think about it, you could even ignore creating Red_Colorizer[2] and just put in your own string anyway, but management gets really difficult.

EditEdit: Or, perhaps, you could use a loop.

EditEditEdit:

Trigger:
  • Init
    • Events
    • Conditions
    • Actions
      • Set cRed[1] = |cffFF0000
      • Set cRed[2] = |R
      • // Perhaps this interface is cleaner.
      • Game - Display to (All players) the text: (cRed[1] + (I love red. + cRed[2]))
 
If you download the DotA template (seen on the left-hand link bar), there are triggers with all the player colours and how they are used inside.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top