1. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  2. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  3. We have a new contest going on right now! Join the 11th Music Contest! You are to make a Cinematic modern sound-track for this contest, so come and compete with other people for fun.
    Dismiss Notice

[Trigger] Evasion-Like Ability

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

  1. mmo.syre

    mmo.syre

    Joined:
    Dec 30, 2008
    Messages:
    5
    Resources:
    0
    Resources:
    0
    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