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

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