Help with Color Coding Usernames

Nets8

New Member
Reaction score
1
Okay so I know how to color code text but here is my trigger:

Trigger:
  • first knight to lvl 2
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Hero level of (Leveling Hero)) Equal to 2
    • Actions
      • Game - Display to (All players) the text: (username+colorcoded)...


I want to make it so the color is dependent on the color of the player who is gaining a level and I also want it to say the person's username. Can you help me out please? ++rep Thanks!
 

ArmyOfFrogs

New Member
Reaction score
20
What you need
PlayerColors, Array, Size How many players you have
PlayerName, array, size how many players you have.

First make this trigger;
playercolors.jpg

^ credits to Senkin for img :)

That stores their colors in a variable

Then-
Trigger:
  • Player Name
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set PlayerName[(Player number of (Picked player))] = (Name of (Picked player))


Stores name

Then for your trigger

Trigger:
  • Level up
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Player_Colors[(Player number of (Owner of (Triggering unit)))] + (PlayerName[(Player number of (Owner of (Triggering unit)))] + (|r + ( is now level + (String((Level of (Triggering unit))))))))


I think that covers it.
 

Nets8

New Member
Reaction score
1
Thanks :D

and btw it should be

Trigger:
  • * Player Name
    • o Events
      • + Map initialization
    • o Conditions
    • o Actions
      • + Player Group - Pick every player in (All players) and do (Actions)
        • # Loop - Actions
          • * Set PlayerName[(Player number of (Picked player))] = (Name of (<b>Picked player</b> not <i>Triggering player</i>))


But thanks :) ++rep
 

Nets8

New Member
Reaction score
1
Thanks :p and can you name the link to the page where you got the image please? I want to copy the color codes. Thanks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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