• 🏆 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!

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