• 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.

what is custom value?

Status
Not open for further replies.
Level 19
Joined
May 1, 2008
Messages
1,130
ok i keep seeing this "unit-set custom value of unit", "item-set custom value of item" in the action of a trigger. whats that? whats it used for? :bored:
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Every unit / item on the map has a value called the "Custom Value". It's comparable to the "hit points" of a unit, i.e. you can manipulate the hit points of each unit individually. Unlike hit points, who have a defined function in the game (namely: your unit dies if its hp < 0), the custom value of a unit has no meaning. You, as the modder, can give meaning to this custom value.

An example could be: making some sort of shield system which makes the custom value of a unit act like shields, so a unit has hit points, mana points and shield points. You would then reduce its shield points (i.e. custom value) every time the unit is attacked by the damage, until it reaches 0.

Ofcourse, there are plenty of reasons you'd wish to use custom value. The shield one is just one of the many examples.
 
Status
Not open for further replies.
Top