• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Vertex coloring.

Status
Not open for further replies.
Level 12
Joined
Oct 16, 2010
Messages
680
the base value of the units vertex coloring is 255,255,255 u can change them but there isn't any function which tells you the numbers
if you want to store it then the base value is 255,255,255 and when you change it save it in an integer variable, so you can use it after. that is all you can do i think

in case in the object editor the coloring is not the default then save that instead of the 255,255,255 and work with it the same way
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Yes, but this is off-topic... i am asking how to store the current percent vertex coloring of the unit (via triggers). I need to store the CURRENT values because i have a bleed spell for example, which makes the vertex coloring to 100% (Red), 60% (Blue), 60% (Green), which makes the unit red, just like it's bleeding. So, if i set the blue vertex coloring (while the unit is bleeding) with another spell to lets say - 100 - (5*ability level), the vertex coloring will become 100%, 80% (for example), 60%. Then a big mess occurs...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
There is no function to get the current vertex color.

One could create a system the tracks the color. You'd have to manually set the initial values for each unit type. Then hook SetUnitVertexColor and SetUnitVertexColorBJ functions. You need vJASS for this.

For your spell, you could just check whether the unit is already under the effect of the ability or not. If it is, don't modify the color again.
 
Status
Not open for further replies.
Top