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

trigger help on % of stats

Status
Not open for further replies.
Level 5
Joined
Jun 30, 2005
Messages
79
I been wanting to find a way to make trasformation for units based on percent of stats just like in dbz tribute I cant find a way since you can only set the percent of hp and mp. The stats are only for add, can anyone help me so when a unit gets an item its stats are set to a percent of his current.
 
Level 6
Joined
Mar 18, 2005
Messages
153
if theres no way around you should consider adding a trigger for this... to prevent weird errors when dropping the item you should use a formula to calculate the natural statvalues for the unit (advantage: the bonus is independent of other +statitems. problem: wont work with tomes).

e.g.:
Code:
Melee Initialization
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item being manipulated) Equal to (+10%agilityitem)
    Actions
        Hero - Set Agility of(Triggering unit) to (((Integer(basevalueofthehero)) + ((Integer(addedperlevel)) x (Level of (Triggering unit)))) x (Integer(1.25))), (Permanent or Temporary:Permanent)

to restore the old value of the stat just use the same formula except the "x (Integer(1.25))" part.

some info: as for this one you'll have to use conversion - convert real to integer (integers are whole numbers (do you call em like that in eng?) like 3 4 5 etc. while real (aka float) can be set to values like 3.45 5.21 etc.

however if you do it this way, remember to update the bonus of the item each time the hero gains a new level.

i've never tried this one before and i cant guarantee that it will work as you want it too. you might try another way if you can.
 
Status
Not open for further replies.
Top