• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Damage Amplify spell.

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2011
Messages
226
Hello! So I figure I need 3 triggers for this ability. This ability increases the amount of damage a target takes by 15%x LEVEL for 5 seconds. I need a trigger for the casting of the spell, for the timing of the spell (loop trigger) and for the damage event before it is done. I am using Bribes damage system also.
  • Curse Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Curse (Dark Wizard)
    • Actions
      • Set TempUnit = (Casting unit)
      • Set TempInteger = (Level of Curse (Dark Wizard) for TempUnit)
      • Set TempPlayer = (Owner of TempUnit)
      • Set TempReal = (0.15 x (Real(TempInteger)))
      • Set TempUnit2 = (Target unit of ability being cast)
      • Unit Group - Add TempUnit2 to AA04_CursedGroup
      • Custom script: set udg_AA04_IdInteger = GetHandleId(udg_TempUnit2)
      • Special Effect - Create a special effect attached to the overhead of TempUnit2 using Abilities\Spells\Undead\Curse\CurseTarget.mdl
      • Hashtable - Save TempReal as 0 of AA04_IdInteger in AA99_Hash
      • Hashtable - Save Handle OfTempUnit as 1 of AA04_IdInteger in AA99_Hash
      • Hashtable - Save 4.98 as 2 of AA04_IdInteger in AA99_Hash
      • Hashtable - Save Handle Of(Last created special effect) as 9 of AA04_IdInteger in AA99_Hash
      • Game - Display to (All players) for 2.00 seconds the text: (String(TempReal))
      • Trigger - Turn on Curse Loop <gen>
  • Curse Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in AA04_CursedGroup) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in AA04_CursedGroup and do (Actions)
            • Loop - Actions
              • Set TempUnit = (Picked unit)
              • Custom script: set udg_AA04_IdInteger = GetHandleId(udg_TempUnit)
              • Set TempReal = (Load 2 of AA04_IdInteger from AA99_Hash)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempReal Greater than 0.00
                • Then - Actions
                  • Hashtable - Save (TempReal - 0.02) as 2 of AA04_IdInteger in AA99_Hash
                • Else - Actions
                  • Special Effect - Destroy (Load 9 of AA04_IdInteger in AA99_Hash)
                  • Unit Group - Remove TempUnit from AA04_CursedGroup
                  • Hashtable - Clear all child hashtables of child AA04_IdInteger in AA99_Hash
        • Else - Actions
          • Trigger - Turn off (This trigger)
This is where the problem is I think...
  • Curse DMG
    • Events
      • Game - UnitIndexEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget is in AA04_CursedGroup) Equal to True
          • DamageEventOverride Equal to False
        • Then - Actions
          • Set DamageEventOverride = True
          • Custom script: set udg_AA04_IdInteger = GetHandleId(udg_DamageEventTarget)
          • Set TempReal = (DamageEventAmount x (Load 0 of AA04_IdInteger from AA99_Hash))
          • Unit - Cause (Load 1 of AA04_IdInteger in AA99_Hash) to damage DamageEventTarget, dealing TempReal damage of attack type Chaos and damage type Unknown
          • Custom script: set udg_AA04_IdInteger = (0)
          • Set DamageEventOverride = False
        • Else - Actions
I don't know how I am supposed to detect the caster of the spell as the source for the extra damage in the damage event trigger, and also maybe I should just set the Damage bonus percentage real in the damage event trigger instead? Thanks for feedback
 
You're using UnitIndexEvent instead of DamageEvent...?

Honestly I'm just really confused about a lot of what you're doing in these triggers.
 
Changed it to damage event and now it amplifies damage. its supposed to increase all damage done to the target by a percentage, the amount amplified should increase depending on how strong the skill is obviously. Im trying to use 15% x Level of Curse at the moment. Currently it does too much damage and I am not sure why? At level 2 Curse makes a 200 damage ability do 85 bonus damage resulting in 285 damage, when it should do only 60 bonus damage based upon 30%, resulting in 260 damage.
 
Status
Not open for further replies.
Back
Top