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

Bonus intelligence equal to 1% of HP

Status
Not open for further replies.
Level 10
Joined
Mar 17, 2012
Messages
582
Hi everyone! I'm trying to create ability that will give a hero bonus intelligence equal to 1% of his maximum life, but I don't know how to make it.
For this passive ability i took "Devotion Aura", renamed it to "Vampire Intelligence" and triggered it kinda:
Unit enters playable map area

Entering unit has buff Vampire Intelligence = true

Hero - Modify Intelligence of Entering Unit : Add ((Integer((Life of (Entering Unit))))/100

But I need Intelligence to change when HP changes and to add like a bonus, but not what I got now.

Help me please to manage it!
 
Level 9
Joined
Apr 19, 2011
Messages
447
When do the HP of your Hero change?
I suppose that they will change when he levels up. So, you can make a trigger to add the bonus each time your hero levels up. Also, if there are items that increase the maximun HP, you can make triggers that get activated when your hero picks these items, and make them configure your Intelligence bonus.
That's the only thing I can think of...

Maybe this is not the best solution to the problem, but I'm not very good with triggered spells... :sad:

However, I hope you find this somewhat useful.

Regards
 
Level 10
Joined
Mar 17, 2012
Messages
582
NarGalloth, thanks for trying, but it's not enough because hero can also get intelligence for peaking up manuals of health and get items that increase strength, health or percentage of health... so it will not work that way as you said...(
 
Level 14
Joined
May 22, 2010
Messages
362
  • IntChange
    • Events
      • Time - Every 0.22 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 0 to 11, do (Actions)
        • Loop - Actions
          • Hero - Modify Intelligence of Vampire[(Integer A)]: Subtract HpInt[(Integer A)]
          • Set MainInt[(Integer A)] = (Intelligence of Vampire[(Integer A)] (Include bonuses))
          • Set HpInt[(Integer A)] = (Integer(((Life of Vampire[(Integer A)]) x ((Real((Level of Devotion Aura for Vampire[(Integer A)]))) / 100.00))))
          • Hero - Modify Intelligence of Vampire[(Integer A)]: Set to (HpInt[(Integer A)] + MainInt[(Integer A)])
  • VampInt Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Devotion Aura
    • Actions
      • Set Vampire[(Player number of (Triggering player))] = (Learning Hero)

HpInt is set to 0 as a default.
 
Last edited:
Level 10
Joined
Mar 17, 2012
Messages
582
WhiteDeath, Unit - A Unit Learns a skill doesn't fit because unit has this skill in Abilities Normal.

Could you explain to me what type of variable I have to use here?
Vampire -
MainInt -
HpInt -
 
Level 14
Joined
May 22, 2010
Messages
362
So the vampint skill is not a hero skill?
Vampire is a unit[array] variable
MainInt and HpInt are integer array vairables
All variables should have a size eaqual to the maximum number of players.
  • VampInt SetUnit
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) has buff Devotion Aura) Equal to True
    • Actions
      • Set Vampire[(Player number of (Triggering player))] = (Triggering unit)
This trigger is instead of VampInt Learn

This ability will work for only one unit owned by each player, so if more than two units for player X have this ability it will not work. I dont completely understand how to make MUI abilities yet so I cant make it work for multiple units owned by the same player.
 
Level 10
Joined
Mar 17, 2012
Messages
582
WhiteDeath, no, this ability has only 1 unit!

I tested it and when I buy item that gives all stats it comes to eternal cycle, adding intelligence every 0.22 seconds so after 30 seconds of a gametime i have 1500 intelligence...
 
Last edited:
Level 10
Joined
Mar 17, 2012
Messages
582
I changed Set MainInt[(Integer A)] = (Intelligence of Vampire[(Integer A)]
(Include bonuses)) to (Exclude bonuses)) and changed Set HpInt[(Integer A)] = (Integer(((Life of Vampire[(Integer A)]) ... to (Integer(((Max Life of Vampire[(Integer A)])

now it seems to be working as I wanted!)))
 
Status
Not open for further replies.
Top