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

[Solved] Trying to learn the triggre editor

Status
Not open for further replies.
Level 8
Joined
Feb 23, 2020
Messages
255
Hello, as the title says, im trying to learn the trigger editor. I'm sure there is, but i dont know how i can make this trigger more simplified than this. Any tips?

  • Golem Armor Stack
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Eat Tree
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 1.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 2
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 1.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 3
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 1.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 4
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 2.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 5
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 2.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 6
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 2.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 7
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 3.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 8
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 3.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Eat Tree for (Triggering unit)) Equal to 9
        • Then - Actions
          • Unit - Set Armor of (Casting unit) to ((Armor of (Triggering unit)) + 3.00)
        • Else - Actions
 
1. use the event "starts effect of an ability"
2. you can shorten this trigger by checking if the ability level is 1-3;4-6;7-9
 
Could use formula:

Set armor = Armor of unit + *Convert Integer to Real*((AbilityLevel-1)/3)+1

Should look like this:
  • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + (Real(((((Level of (Ability being cast) for (Triggering unit)) - 1) / 3) + 1))))
 
Could use formula:

Set armor = Armor of unit + *Convert Integer to Real*((AbilityLevel-1)/3)+1

Should look like this:
  • Unit - Set Armor of (Triggering unit) to ((Armor of (Triggering unit)) + (Real(((((Level of (Ability being cast) for (Triggering unit)) - 1) / 3) + 1))))

Thank you very much man, that's much prettier than mine lol, can i do similar things if i want the damage to be increased. I.E 50+ per level?
 
Thank you very much man, that's much prettier than mine lol, can i do similar things if i want the damage to be increased. I.E 50+ per level?

Yeah, I don't see why you couldn't. Just put the entire integer part in a parenthesis and multiply it by 50, so it'd be like:

Set damage = Damage of unit + (*Convert Integer to Real*((AbilityLevel-1)/3)+1) x 50
 
If you can’t find a formula that outputs the values you want, you can also store the level values in an array:

Set SpellArmor[1] = 1.00
Set SpellArmor[2] = 1.50
Set SpellArmor[3] = 4.25
Set SpellArmor[4] = 10.00

Unit - Set armor of (Triggering Unit) you ((Armor of (Triggering Unit)) + SpellArmor[(Level of (Ability being cast) for (Triggering Unit))]
 
Status
Not open for further replies.
Back
Top