• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Fatal Arrow Trigger

Status
Not open for further replies.
Level 11
Joined
Jul 9, 2009
Messages
926
This skill is based off Fury Swipes , of Ursa Warrior in DOTA.

Wherein, In each attack, the hero deals more damage.
For example, I dealt 10 damage now, Ill deal 15 next, and then 20, 25 then so on.

Magtheridon created me a trigger but I cant somehow make it work
can anyone see if there is something wrong here ?

This trigger uses , Damage Engine and Unit Indexer

  • FatalArrowCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fatal Arrow
    • Actions
      • Set FatalArrowCount[(Custom value of (Triggering unit))] = 5
  • FAOnCast
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Set Int1 = (Custom value of DamageEventSource)
      • Set Int2 = (Custom value of DamageEventTarget)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FatalArrowCount[Int1] Greater than 0
        • Then - Actions
          • Trigger - Turn off Damage Engine <gen>
          • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing FatalArrowDamage[Int2] damage of attack type Spells and damage type Normal
          • Trigger - Turn on Damage Engine <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FatalArrowCount[Int1] Equal to 1
            • Then - Actions
              • Set FatalArrowDamage[Int2] = 0.00
              • Set FatalArrowCount[Int1] = 0
            • Else - Actions
              • Set FatalArrowDamage[Int2] = (FatalArrowDamage[Int2] + (5.00 + (5.00 x (Real((Level of Fatal Arrow for DamageEventSource))))))
              • Set FatalArrowCount[Int1] = (FatalArrowCount[Int1] - 1)
Thanks in advance :)

The Attacking hero is ranged BTW :)
 
Level 11
Joined
Jul 9, 2009
Messages
926
I dont know how I would fix this though as Magtheridon gave me this base Idea. I'll try to think of how it will work, but I have no Idea though right now :\
 
Level 11
Joined
Jul 9, 2009
Messages
926
Is this right ??
  • FAOnCast
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Set Int1 = (Custom value of DamageEventSource)
      • Set Int2 = (Custom value of DamageEventTarget)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FatalArrowCount[Int1] Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FatalArrowCount[Int1] Equal to 1
            • Then - Actions
              • Set FatalArrowDamage[Int2] = 0.00
              • Set FatalArrowCount[Int1] = 0
            • Else - Actions
              • Set FatalArrowDamage[Int2] = (FatalArrowDamage[Int2] + (5.00 + (5.00 x (Real((Level of Fatal Arrow for DamageEventSource))))))
              • Set FatalArrowCount[Int1] = (FatalArrowCount[Int1] - 1)
        • Else - Actions
          • Trigger - Turn off Damage Engine <gen>
          • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing FatalArrowDamage[Int2] damage of attack type Spells and damage type Normal
          • Trigger - Turn on Damage Engine <gen>
 
Level 11
Joined
Jul 9, 2009
Messages
926
  • FAOnCast
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Set Int1 = (Custom value of DamageEventSource)
      • Set Int2 = (Custom value of DamageEventTarget)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FatalArrowCount[Int1] Greater than 0
        • Then - Actions
          • Trigger - Turn off Damage Engine <gen>
          • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing FatalArrowDamage[Int2] damage of attack type Spells and damage type Normal
          • Trigger - Turn on Damage Engine <gen>
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FatalArrowCount[Int1] Equal to 1
            • Then - Actions
              • Set FatalArrowDamage[Int2] = 0.00
              • Set FatalArrowCount[Int1] = 0
            • Else - Actions
              • Set FatalArrowDamage[Int2] = (FatalArrowDamage[Int2] + (5.00 + (5.00 x (Real((Level of Fatal Arrow for DamageEventSource))))))
              • Set FatalArrowCount[Int1] = (FatalArrowCount[Int1] - 1)
        • Else - Actions
This is the trigger I think was right, but then it still does not work
maybe theres something wrong on the event. maybe I should set it to 3 ? (Ranged Damage)

or there is something wrong with the 1st trigger

  • FatalArrowCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fatal Arrow
    • Actions
      • Set FatalArrowCount[(Custom value of (Triggering unit))] = 5
as Fatal Arrow is a passive ability and cannot be casted.
 
Level 11
Joined
Jul 9, 2009
Messages
926
Ok so this what I did
  • FatalArrowCast
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Fatal Arrow for (Attacking unit)) Greater than or equal to 1
      • ((Attacked unit) has buff Incinerate) Equal to False
    • Actions
      • Set FatalArrowCount[(Custom value of (Triggering unit))] = 1000000000
I check if the unit attacking has fatal arrow and the target he is attacking does not have the buff yet. I set the count to 100000000 so that the stacking of damage would be endless.

and just as you said move the lower if/then/else to the "then" of the 1st if/then/else.

  • FAOnCast
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Set Int1 = (Custom value of DamageEventSource)
      • Set Int2 = (Custom value of DamageEventTarget)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FatalArrowCount[Int1] Greater than 0
        • Then - Actions
          • Trigger - Turn off Damage Engine <gen>
          • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing FatalArrowDamage[Int2] damage of attack type Spells and damage type Normal
          • Trigger - Turn on Damage Engine <gen>
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FatalArrowCount[Int1] Equal to 1
            • Then - Actions
              • Set FatalArrowDamage[Int2] = 0.00
              • Set FatalArrowCount[Int1] = 0
            • Else - Actions
              • Set FatalArrowDamage[Int2] = (FatalArrowDamage[Int2] + (5.00 + (5.00 x (Real((Level of Fatal Arrow for DamageEventSource))))))
              • Set FatalArrowCount[Int1] = (FatalArrowCount[Int1] - 1)
        • Else - Actions
And now it works ! Thank you for teaching me :D +rep
 
Last edited:
Status
Not open for further replies.
Top