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

[Trigger] Leak Check

Status
Not open for further replies.
Level 10
Joined
Sep 6, 2008
Messages
423
I'm not 100% sure I should post this here but i was told to post here with this kind of a question.
I made 4 spells yesterday, in fact they are my first 100% triggered spells and I'm really not experienced with triggers yet so i would need someone to take a look at my triggers.
  • Hammer of Smiting
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Hammer of Smiting for (Attacking unit)) Greater than 0
    • Actions
      • Set Rand_Int = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rand_Int Less than or equal to (5 x (Level of Hammer of Smiting for (Attacking unit)))
        • Then - Actions
          • Set TempLoc = (Position of (Triggering unit))
          • Unit - Cause (Attacking unit) to damage (Triggering unit), dealing (((Real((Agility of (Attacking unit) (Include bonuses)))) / 2.00) x (Real((Level of Hammer of Smiting for (Attacking unit))))) damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation( udg_TempLoc)
        • Else - Actions
      • Set Rand_Int = 0
  • Judgement
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Judgement
    • Actions
      • Set TempReg = (Region centered at (Position of (Triggering unit)) with size (700.00, 700.00))
      • Set TempLoc = (Random point in TempReg)
      • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 200.00 at TempLoc, dealing ((200.00 x (Real((Level of Judgement for (Triggering unit))))) + (100.00 x (Real((Level of Divine Cause for (Triggering unit)))))) damage of attack type Spells and damage type Normal
      • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation( udg_TempLoc)
      • Custom script: call RemoveRect( udg_TempReg)
  • Divine Cause
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Divine Cause for (Attacking unit)) Greater than 0
    • Actions
      • Set Rand_Int = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rand_Int Less than or equal to (5 x (Level of Divine Cause for (Attacking unit)))
        • Then - Actions
          • Set TempLoc = (Position of (Attacking unit))
          • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + (((Real((Strength of (Attacking unit) (Include bonuses)))) / 2.00) x (Real((Level of Divine Cause for (Attacking unit))))))
          • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation( udg_TempLoc)
        • Else - Actions
      • Set Rand_Int = 0
  • Holy Protection
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) has buff Protected ) Equal to True
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x (1.00 + (Real((Level of Divine Cause for (Triggering unit)))))))
      • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation( udg_TempLoc)
Please help me by pointing out leaks (if there are any) and if you are really kind tell me if they're MUI or MPI (if not, how to make them).

Thanks in advance
 
Level 10
Joined
Sep 6, 2008
Messages
423
Thanks :smile: I was almost sure i had overseen something :zip:
Think this would be good enough for an upload?:cute:

EDIT: Fixed the second trigger(at least I think it's fixed now).
  • Judgement
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Judgement
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempReg = (Region centered at TempLoc with size (700.00, 700.00))
      • Custom script: call RemoveLocation( udg_TempLoc)
      • Set TempLoc = (Random point in TempReg)
      • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 200.00 at TempLoc, dealing ((200.00 x (Real((Level of Judgement for (Triggering unit))))) + (100.00 x (Real((Level of Divine Cause for (Triggering unit)))))) damage of attack type Spells and damage type Normal
      • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation( udg_TempLoc)
      • Custom script: call RemoveRect( udg_TempReg)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Never, ithe event detects when the unit enters the attack process, even before the projectile is launched if it is ranged. The on damage event detects when damage is delt but before it is delt. Thus you need to use the 2 with a timer to accuratly get when an attack deals damage.
 
Status
Not open for further replies.
Top