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

Problem with Event trigger

Status
Not open for further replies.
Level 9
Joined
Apr 7, 2010
Messages
480
i have a problem here, why does my unit change to another unit before he can even damage the enemy?

  • Raider Rage
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set Rage = (Random integer number between 1 and 10)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Rage Equal to 1) and ((Unit-type of (Attacking unit)) Equal to Raider)
        • Then - Actions
          • Unit - Replace (Attacking unit) with a Fel Orc Raider using The old unit's relative life and mana
        • Else - Actions
 
If it's a ranged unit the missile will origin from a unit that doesn't exist in the game, so it will deal 0 damage. The melee doesn't have the time to damage, since Unit - A unit is attacked occurs when the attacking unit plays its attack animation.
Either use a wait or (better) use the event Unit - A unit is damaged. Use a damage detection system to do that.
 
Status
Not open for further replies.
Top