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

Upgrading heroes with unit upgrades

Status
Not open for further replies.
Level 2
Joined
Aug 9, 2007
Messages
4
Hey, Im making a map where you can, instead of buying recipes, just Store the item in an invisible inventory. For example, if I had claws of attack +15 damage, Id be able to Permanently add 15 damage to the hero and remove the item. Since i dont want to use confusing JASS triggers, I decided I would use unit upgrades and use "set players research level to X" Alas, unit upgrades dont work on heroes!!! so i was wondering if there was a way to make unit upgrades upgrade heroes too?
thanks in advance,
~Possum
 
Level 2
Joined
Sep 1, 2007
Messages
12
You can give an item - claw of attack ability to a spell book and set the claw of attack ability level to x, where x is the maximum possible damage bonus achievable in your map. Hold Shift and double-click on the item's stats - Level to set to the desire level. The item ability should have an incremental bonus damage of 1.

The greater x is the greater the map loading. Anyone want to verify this, whether change is significant or not; i, certainly, notice a significant increased loading time with a 1000 level claw of attack? The increase appear to be at the 66% mark to the length of the loading bar.

Disable the spell book ability to remove the spell book icon, but still maintain the integrity of the passive bonuses.

I would advise you to use the GUI function Unit - Increase/Decrease Level of Ability for Unit. Store a unit accumulative damage in a global variable. You have to decide whether to use level 1 as 0 bonus damage or use a trigger to disable the abilities.

This method is not limited to claw of attack.

---
JASS, like GUI, have no native function that add damage to a unit; no SetUnitDamage(whichUnit). You can either do as i mentioned above or used tome of damage. These are two method, in my opinion, is the most efficient.
 
Last edited:
Level 19
Joined
Aug 24, 2007
Messages
2,888
if you use WE unlimited you can make a trigger like increase damage of unit give a try I dont know another way to do it
 
Jaeron is right . You the Claw of Attack ability with different levels to create a flexible system for that. (or other Item abilities like Stat bonus / armour bonus /..)
Upgrades do work on heros aswell (you have to add the used upgrade to the hero) BUT it would not work because you are not able to decrease an upgrade (as far as i know) - so "dropping the item" would mean to keep the damage even if you try to reset the upgrade again.
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Pst, rabid_possumsex, very first post? Introduce yourself to the Hive in our
peonforum.gif
Introduction Forum!
 
Level 2
Joined
Aug 9, 2007
Messages
4
thanks

i actually thought of adding an item ability to units before i checked back here - tbh i didnt think it would actually work. the GUI trigger is sort of complicated cause i use a lot of variables, but i made an ability that has increments of 10 each level starting at level 2, so i can set it to level 1 and itll give a +0 damage bonus and then when they aquire an item... claws of attack +20 - i can add two more levels to the ability making it level 3. then i can reset it to level one, and add 6 levels if somebody acquired a +50 damage item. the only problem is... theres a 3 second lag the first time the unit learns the ability, but everything else works fine... theres no icon so i can be very discreet about it. thanks again,
~possum
 
Status
Not open for further replies.
Top