• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Automatic Spell Learn

Status
Not open for further replies.
Level 4
Joined
Jan 12, 2014
Messages
64
Hi Everyone ,i add 5 spell for each hero in my map and i want to add attribute bonus too , what can i do? can add this spell after a specific level automatic to hero? (Example : after level 10 each level hero gain add 3 all stat).
sorry if my english is not good :ogre_icwydt:
 
Level 8
Joined
Jul 8, 2013
Messages
249
First off, I actually had some similar questions recently. This thread might help you figure out what your options are: http://www.hiveworkshop.com/forums/...umber-needed-cant-granted-246711/#post2475291

Now in terms of simply adding 3 to each stat on every level after 10, you kind of have two options. The simplest option is as follows:

  • Attribute Add
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Hero level of (Triggering unit)) Greater than 10
    • Actions
      • Hero - Modify Strength of (Triggering unit): Add 3
      • Hero - Modify Agility of (Triggering unit): Add 3
      • Hero - Modify Intelligence of (Triggering unit): Add 3
Another option:
Make a new ability based on Attribute Bonus. Give it as many levels as heroes can gain after 10 +1. For example, if heroes can go to level 100 then give it 91 levels.
Make it not a hero ability.
Change the level 1 agility bonus to 0, the level 2 agility bonus to 3, etc. Do the same for strength and intelligence.
Change Hide Button to true for every level.

Now give that unit ability to every hero you want to be able to gain those attributes. Then make the following trigger:

  • Attribute Add2
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Hero level of (Triggering unit)) Greater than 10
    • Actions
      • Unit - Increase level of AttributeBonus for (Triggering unit)
So both of those options will have MOSTLY the same mechanical effects, but the display will be different. For the second option the attribute increase will display as a green bonus next to the base attribute score. For the first option the base attribute score will change. If you want to make the bonus more obvious to the players, you should thus go with the second option.

One difference that actually matters though: if you try to detect the attribute of a hero through a trigger for some reason then the attribute bonuses will only be included if you choose the 'Include Bonuses' option.

  • Set HeroStrength = (Strength of (Triggering unit) (Exclude bonuses))
So the attribute bonuses from the second option would NOT be included in the variable Hero Strength by the above action. They WOULD be if Exclude was changed to Include, but so would item bonuses and so on which might or might not be desirable.
 
Last edited:
Status
Not open for further replies.
Top