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

Help with Heroes

Status
Not open for further replies.
Level 4
Joined
Jan 14, 2005
Messages
73
Ok, My problems a little stupid.

Basicly I made an "Upgrade" thats supposed to level up with my heroes and bring thier HP and MP Up however it doesnt seem to work

Also I cant set the base hp/mp to my heroes I wanted my hero to have 450hp, 600mp at level 1 and then for each level after that its supposed to go up by 150hp and 600mp.

unfortunatly my hero starts with 900hp and 200mp and no matter what i change (around the heros base HP and MP) it doesnt change at all once i start playing. the map was just being started so im pretty sure its not somthing ive done...(Probably somthing I havent done) if anyone knows how to put a heroes hp and mp + a defined ammount each level let me know.

Thanks.. (If you need more info il upload the crappy map next weekend)
 
Level 2
Joined
Sep 26, 2010
Messages
12
Upgrades for heroes...

I worked with upgrades for heroes a little myself, but some work, and others don't. For example, upgrades that increase attack damage work, but ones that increase defense don't.

My eventual solution to the problem was to just cheat and fix the problem with triggers, looking something like this...

Event
Every 1 second

Condition
Current research level of (your upgrade here) for (the player owning your hero here) equal to (the neccesary level of the upgrade.)

Actions
Turn off this trigger
Then edit the hero stats, or do whatever else to the hero.

It's a roundabout way to do this, and it looks a little odd, but for me, it got the job done.
 
Ok, My problems a little stupid.

Basicly I made an "Upgrade" thats supposed to level up with my heroes and bring thier HP and MP Up however it doesnt seem to work

Also I cant set the base hp/mp to my heroes I wanted my hero to have 450hp, 600mp at level 1 and then for each level after that its supposed to go up by 150hp and 600mp.

unfortunatly my hero starts with 900hp and 200mp and no matter what i change (around the heros base HP and MP) it doesnt change at all once i start playing. the map was just being started so im pretty sure its not somthing ive done...(Probably somthing I havent done) if anyone knows how to put a heroes hp and mp + a defined ammount each level let me know.

Thanks.. (If you need more info il upload the crappy map next weekend)

heroes have hp equal to base + strength*(hp-per-str) while they have mana equal to int*(mana-per-int)...

for the upgrade make sure that the hero uses that upgrade... there is a line in the OE for that Techtree - Upgrades used
 
Also I cant set the base hp/mp to my heroes I wanted my hero to have 450hp, 600mp at level 1 and then for each level after that its supposed to go up by 150hp and 600mp.

make a formula like Adiktuz said...

i should look like this

  • Events
    • a unit gains a level
  • Condition
    • ADD WHATEVER YOU WANT
  • Actions
    • set Hp = life of triggering unit + 150
    • set Mp = mana of triggering unit + 600
    • set life of triggering unit = life of triggering unit + Hp
    • set Mana of triggering unit = Mana of triggering unit + Mp
 
Last edited:
make a formula like Adiktuz said...

i should look like this

  • Events
    • a unit gains a level
  • Condition
    • ADD WHATEVER YOU WANT
  • Actions
    • set Hp = life of triggering unit + 150
    • set Mp = mana of triggering unit + 600
    • set life of triggering unit = life of triggering unit + Hp
    • set Mana of triggering unit = Mana of triggering unit + Mp

you cannot do that... why? because he wants to alter the max hp/mp and you cannot alter a units max hp and mp using simple triggers...

btw, the formula I put was the one that War3 uses on heroes (based on my experience, dont know if there is something wrong there)
 
you cannot do that... why? because he wants to alter the max hp/mp and you cannot alter a units max hp and mp using simple triggers...

btw, the formula I put was the one that War3 uses on heroes (based on my experience, dont know if there is something wrong there)

oh I get it...you mean like this?

NOTE: The trigger below will work on blood mage, it will increase HP=150 and MP=600 every level...

  • Gain HP MP
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Hero - Modify Strength of (Triggering unit): Add 4
      • Hero - Modify Intelligence of (Triggering unit): Add 37
 
Last edited:
oh I get it...you mean like this?

NOTE: The trigger below will work on blood mage, it will increase HP=150 and MP=600 every level...

  • Gain HP MP
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Hero - Modify Strength of (Triggering unit): Add 4
      • Hero - Modify Intelligence of (Triggering unit): Add 37

but he needs only hp/mp and not modifying the hero stats coz hero stats have other effects you know... thats why he used researches...
 
Hero Stats can effect A LOT of other side-effects (increase in HP regen per sec, increase in base armor, etc)
So, a better way to do this is by Researching, OR what's wrong with trigger in post #5?
It's still consider as a formula that can be repeated

post #5 will not work, so its wrong, but #7 is OK but yes, research is better...
 
Hero Stats can effect A LOT of other side-effects (increase in HP regen per sec, increase in base armor, etc)
So, a better way to do this is by Researching, OR what's wrong with trigger in post #5?
It's still consider as a formula that can be repeated

what's wrong with post 5? he modify the unit's current life... and the one that jasonmbrown wants is to modify the unit's max life... see the difference? current life versus max life... and there is no direct action that changes the max life... so its either researches or the bonus hp/mp item abilities...
 
OTHER than suggestion in post #7, can somebody tell me how to gain a +HP/MP per level?
The only thing in my mind is through Research, yeah ?
Every level up, set the (current research) + (1)
I forgot the triggers, but this is the main idea though

using researches or the max hp/mp gain item abilities directly or this

 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Tomes of health have an ability that increases max health.

Copy an paste that ability, and make three versions of it for example. Health +1, health +5 and health +20.

Then create three items, use manual of health as base item. Assign those abilities to the items.

When you want to increase max health, create those items for the hero.

If you want to increase max health by 127, create 6 * +20, 1 * +5 and 1 * +1 healht items. Create a trigger with three loops, that'll do.

If you want it to work for normal units, give normal units a custom inventory with zero slots.

If you want to reverse the effect, save the number +total health. Create items for the unit with -x health versions instead of +health.

That's the GUI way.
 
For the Bonus Mod, it's meant to be for vJASS, maybe he want it in GUI, yeah?

that's why I also said, use the max hp/mp modifying item abilities directly or the research so that he can do it in GUI... are you reading the whole post???

and using the items directly is this:

Tomes of health have an ability that increases max health.

Copy an paste that ability, and make three versions of it for example. Health +1, health +5 and health +20.

Then create three items, use manual of health as base item. Assign those abilities to the items.

When you want to increase max health, create those items for the hero.

If you want to increase max health by 127, create 6 * +20, 1 * +5 and 1 * +1 healht items. Create a trigger with three loops, that'll do.

If you want it to work for normal units, give normal units a custom inventory with zero slots.

If you want to reverse the effect, save the number +total health. Create items for the unit with -x health versions instead of +health.

That's the GUI way.
 
Status
Not open for further replies.
Top