• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to change the colour of a unit

Status
Not open for further replies.
Level 5
Joined
Jun 28, 2008
Messages
127
How do I change the colour of a unit? E.g make a troll black or make a human black ... the shade of skin thingy ... it's used in a lot of games such as 300 and many loaps
 
Level 34
Joined
May 1, 2008
Messages
3,213
Open WE -> open Obect Editor (F6) -> Units -> Select unit -> search for ''Art - Tinting Color (Red)'' ''Art - Tinting Color (Green)'' and ''Art - Tinting Color (Blue)''

it looks like this
Art - Tinting Color (Red) 255
Art - Tinting Color (Green) 255
Art - Tinting Color (Blue) 255

change it into this
Art - Tinting Color (Red) 150
Art - Tinting Color (Green) 150
Art - Tinting Color (Blue) 150

and it should look like this ingame
TintingScreenshot.jpg
 
Level 18
Joined
Aug 13, 2007
Messages
1,584
Yes. The color values vary between 0 and 255, 0, 0, 0 meaning a black model, 255, 555, 255 meaning a normally colored model. If the three colors have equal values between 0 and 255, the model has a grayish tint. If red has a greater value, the model will be reddish and so on.
 
Level 7
Joined
Jun 16, 2008
Messages
327
Yes, indeed. The more darker black you want, the more you decrease all three tinting colours.

If you want a unit to change colour ingame without the use of the Art - Tinting, then triggers come in handy:

  • Actions
    • Animation - Change YourUnit's vertex coloring to (25.00%, 25.00%, 25.00%) with 0.00% transparency
Please note that the percentage values may be changed to suit your desires.
 
Level 7
Joined
Feb 18, 2007
Messages
82
If he just want the units black, why dont just use an easy trigger like this?:
  • Events
    • Time - Elapsed time is 0.01 seconds/Unit is created/blabla
  • Conditions
    • Unit - Created Unit is equal to footman/blabla
  • Actions
    • Unit - Change color of Created Unit/footman/blabla to Black

But.. why would someone want an exact black/whatever colour? Tint options let you do it to precisely how you would like it, :S.
 
Status
Not open for further replies.
Top