• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Question on Trigger (for Spells)

Status
Not open for further replies.
Level 5
Joined
Jul 24, 2008
Messages
106
Hey, Hive!

I created an ability for a hero based on attribute bonus.
When this ability is learned, the hero gains 3 new abilities, each on level 1.

How do I increase the level of the 3 spells as the level of the primary ability (the one based on attribute bonus) increases?
 
  • Events
    • Unit - A unit reaches a new level
  • Conditions
    • Level of *BASE-ABILITY* for (Triggering Unit) Greater than (>) 0
  • Actions
    • Unit - Set level of *ability 1* to ((Level of *ability 1*) + 1)
    • Unit - Set level of *ability 2* to ((Level of *ability 2*) + 1)
    • Unit - Set level of *ability 3* to ((Level of *ability 3*) + 1)
Somewhat like this
 
  • Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to BaseAbility
    • Actions
      • Unit - Set level of Ability1 for (Learning Hero) to (Learned skill level)
      • Unit - Set level of Ability2 for (Learning Hero) to (Learned skill level)
      • Unit - Set level of Ability3 for (Learning Hero) to (Learned skill level)
try this...
 
Well i use this
  • Skill
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to BaseSkill
    • Actions
      • Unit - Add AdditionSkill1 to (Learning Hero)
      • Unit - Add AdditionSkill2 to (Learning Hero)
      • Unit - Set level of AdditionSkill1 for (Learning Hero) to (Level of BaseSkill for (Learning Hero))
      • Unit - Set level of AdditionSkill2 for (Learning Hero) to (Level of BaseSkill for (Learning Hero))
 
sorry, i forgot to add this if:
  • Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to BaseAbility
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned skill level) Equal to 1
        • Then - Actions
          • Unit - Add AdditionAbility1 to (Learning Hero)
          • Unit - Add AdditionAbility2 to (Learning Hero)
          • Unit - Add AdditionAbility3 to (Learning Hero)
        • Else - Actions
      • Unit - Set level of AdditionAbility1 for (Learning Hero) to (Learned skill level)
      • Unit - Set level of AdditionAbility2 for (Learning Hero) to (Learned skill level)
      • Unit - Set level of AdditionAbility3 for (Learning Hero) to (Learned skill level)
this trigger has few leaks if I'm not wrong, so don't forget to remove the leak.
 
Status
Not open for further replies.
Back
Top