• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Trigger damage

Status
Not open for further replies.
Level 4
Joined
Feb 24, 2018
Messages
71
Hello there! I'm trying to make an ability where my hero has x chance on melee hit to deal 5% of target's maximum hp as damage on lvl 1 / 10% on level 2 / 15 % on level 3. But it does a lot more than that. Is something wrong with the trigger ?
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Level of Obliterate for GDD_DamageSource) Greater than 0
    • Then - Actions
      • Set unit[1] = GDD_DamageSource
      • Set unit[2] = GDD_DamagedUnit
      • Trigger - Run SETTINGS FOR OBLITERATE <gen> (checking conditions)
      • 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 50
        • Then - Actions
          • Unit - Cause unit[1] to damage unit[2], dealing real[12] damage of attack type Normal and damage type Normal
          • Special Effect - Create a special effect attached to the chest of unit[2] using Abilities\Spells\Undead\FrostArmor\FrostArmorDamage.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
    • Else - Actions
  • SETTINGS FOR OBLITERATE
    • Events
    • Conditions
    • Actions
      • -------- DMG --------
      • Set real[12] = (0.05 x (Max life of unit[2]))
      • Set real[12] = (real[12] x (Real((Level of Obliterate for unit[1]))))
 
Instead of *0.05 try /20

real[12] is a real-type, right?
I have the feeling that one of the conversions returns an Int instead of Real... I cant remember if WE round Int conversions up or down, but if it is up, then that would be causing the problem.


Also, you don't need to separate the set-up, do you? In the given context it does not make sense putting it in a separate trigger...

Also, is the auto-attack damage the only thing that runs this trigger? Could it be possible that there is some extra damage that triggers this, like added damage to the AA or else? You need to Disable the DDS before dealing trigger damage and Enable it after trigger damage is dealt.
 
I put the damage in the same trigger and I removed the separate trigger but still doesn't work.It is possible that there is some extra damage that triggers this.
Do you mind if I send you the map to check it out ?
 
Status
Not open for further replies.
Back
Top