• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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.
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
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