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

[Spell] On hit spells

Status
Not open for further replies.
Level 3
Joined
Jan 4, 2009
Messages
45
Hello. I have problems making a spell and I would need some help, I don't know how to make it. I want to make a spell, that will cause the casters next attack to deal bonus damage and stun the enemy and knock it back (like a normal bash). But I want it to be an active ability. Like you cast it, and your next attack will bash. I tried it in different ways, but none of them works.
 
if you give a buff, it will be debuffed so the next attack will be null...

anyway, what to explain further, it works like this...
  • Bash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • -------- get the ID and save the integer to a hashtable --------
      • Custom script: set udg_BashID = GetHandleId(GetTriggerUnit())
      • Hashtable - Save 1 as 1 of BashID in BashHash
      • Set BashOffIndex = (BashOffIndex + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BashOffIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on BashOn <gen>
        • Else - Actions
  • BashOn
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Level of Thunder Clap for GDD_DamageSource) Greater than 0
    • Actions
      • Custom script: set udg_BashID = GetHandleId(udg_GDD_DamageSource)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Load 1 of BashID from BashHash) Equal to 1
        • Then - Actions
          • -------- this is the Bash/knockback start (too lazy to add it :) --------
          • Unit - Kill GDD_DamagedUnit
          • Set BashOffIndex = (BashOffIndex - 1)
          • -------- clearing the value so that this will not run again until the next ability cast --------
          • Hashtable - Clear all child hashtables of child BashID in BashHash
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BashOffIndex Equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
        • Else - Actions
 
Status
Not open for further replies.
Top