1. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  2. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  3. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice

[Trigger] Evasion-Like Ability

Discussion in 'Triggers & Scripts' started by mmo.syre, Dec 30, 2008.

  1. mmo.syre


    Dec 30, 2008
    Ive been trying to make a simple trigger..I basicly want it so when theres a set percent chance that when a unit is attacked he takes no damage while automatically phases around the opponent..I have the main part done, but when the unit gets hit he still takes damage..so i need to find a way to heal the unit the damage the opponent dealt..i tried Event Response - Damage Taken..but that dident work unfortunely..i was hopeing someone could help..heres what i got so far..
    • Phase Shift
      • Events
        • Unit - A unit Is attacked
      • Conditions
        • (Unit-type of (Attacked unit)) Equal to Test Defender
      • Actions
        • Set Phase_Integer = (Random integer number between 1 and 10)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Or - Any (Conditions) are true
              • Conditions
                • Phase_Integer Equal to 1
                • Phase_Integer Equal to 2
                • Phase_Integer Equal to 3
                • Phase_Integer Equal to 4
          • Then - Actions
            • Unit - Remove Evasion from (Attacked unit)
            • Unit - Add Phase Shift to (Attacked unit)
            • Unit - Order (Attacked unit) to Night Elf Faerie Dragon - Phase Shift
            • Wait 0.50 seconds
            • Unit - Move (Attacked unit) instantly to ((Position of (Attacking unit)) offset by -200.00 towards (Facing of (Attacking unit)) degrees), facing (Position of (Attacking unit))
            • Wait 0.25 seconds
            • Unit - Order (Attacked unit) to Attack (Attacking unit)
            • Unit - Remove Phase Shift from (Attacked unit)
            • Unit - Add Evasion to (Attacked unit)
          • Else - Actions
    The Unit - Add/Remove Evasion..are only for looks for the hero..

    Thanks in advance ;x