• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

[Trigger] Help! Trigger causes hero to suicide himself!

Status
Not open for further replies.
Hello all. I'm making an RPG and I need help with this trigger I made. It's called Essence of Thunder and it gives whoever has the passive ability a chance to either do bonus damage based on its Agility or get increased attack speed. The Action that does bonus damage is o.k., but I think the part that makes my hero kill himself is the increased attack speed Action. Here's the trigger:


  • Essence of Thunder
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacking unit) has buff Essence of Thunder (Mana Regeneration)) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 12
            • Then - Actions
              • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
              • Unit - Hide (Last created unit)
              • Unit - Add Essence of Thunder (Attack Speed) to (Last created unit)
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
            • Else - Actions
              • Do nothing
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 15
            • Then - Actions
              • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing ((((Real((Agility of (Attacking unit) (Include bonuses)))) / 10.00) x 2.00) x 12.00) damage of attack type Spells and damage type Normal
              • Special Effect - Create a special effect attached to the origin of (Attacked unit) using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
              • Wait 0.50 seconds
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Do nothing
 
Level 2
Joined
Jan 31, 2008
Messages
21
  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
When the timer expires, the hero dies. The expiration timer treats the hero as a summoned unit, when the timer expires the unit dies. Change the expiration timer to a normal timer in the world editor
 
I noticed something wrong: if you hide the unit, it won't be able to do anything.
I don't know if it's possible, but as (Last Created Unit) would be null (as it's hidden), maybe the expiration timer is being added to the hero.

Instead of hiding the dummy, try setting its model file to "_", so it's invisible (it will appear a green checkered cube, but don't worry, it won't show ingame), and add the Locust ability.
 
I did what you guys said, but it still doesn't work. I even disabled the trigger, but he still dies. This post has the attachment to my map. Maybe you can look over the map and see what's wrong with it.

*EDITED*
It seems I have found out why my hero kills himself. My ability to ignore damage from the Hardened Skin ability was all wrong. Thanks for your help anyways. +REP TO ALL ON THIS THREAD!
 
Last edited:
Status
Not open for further replies.
Top