• 🏆 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!

Heavy Counter v1.0

  • Like
Reactions: deepstrasz
HEAVY COUNTER
REQUIRES 1.32 PATCH OR ABOVE
!YOUR MAP MAY NOT USE "Unit - Set Custom Value" ANYWHERE IN TRIGGERS!

ABILITY INFORMATION:
Takes a defensive stance for 3 seconds. If attacked during the stance, launch a counterattack that deals heavy damage and block said attack.
Level 1 - 250 damage.
Level 2 - 500 damage.
Level 3 - 750 damage.

INSTALLATION GUIDE:
0. Enable 'Automatically Create Variables while Pasting Trigger Data' in Fil > Preference > General
1. Install Unit Indexer on your map
2. Install Damage Engine on your map
3. Copy the Heavy Counter ability in Object Editor
4. Paste the ability to your map's Object Editor
5. Copy the Heavy Counter folder in Trigger Editor
6. Paste the folder in your map's Trigger Editor
7. DONE! If you want to configure things, just modify the HC Config trigger

MEDIA SHOWCASE:

CHANGELOG:
1.0:
First Release

CREDIT:
Bribe - Unit Indexer + Damage Engine



If you like this work and wish to support me financially, you can support me via Ko-fi.
Contents

Heavy Counter (Map)

Reviews
Wrda
Seems pretty straightforward, simple, efficient and a decent idea. I don't remember if in 1.32 there's the native BlzGroupGetSize, which basically gives you the amount of units in the group and it's more efficient than the one you're using, but you...

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,864
Pretty decent and simple spell. It's well coded.
The only thing I have to say is that in HC Counter you're setting variables
  • Set Variable Set HC_Unit = DamageEventTarget
  • Set Variable Set HC_TempData = (Custom value of HC_Unit)
when they're not necessary at all here. You're only using custom value of unit once. As for the other variable, DamageEventTarget already does the job, while at same time you're using it when causing damage.
 
Pretty decent and simple spell. It's well coded.
The only thing I have to say is that in HC Counter you're setting variables
  • Set Variable Set HC_Unit = DamageEventTarget
  • Set Variable Set HC_TempData = (Custom value of HC_Unit)
when they're not necessary at all here. You're only using custom value of unit once. As for the other variable, DamageEventTarget already does the job, while at same time you're using it when causing damage.
Putting this into my notes for now. I think it has something to do with the original idea being overly complicated for the short time I had.
 

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,864
Seems pretty straightforward, simple, efficient and a decent idea.

I don't remember if in 1.32 there's the native BlzGroupGetSize, which basically gives you the amount of units in the group and it's more efficient than the one you're using, but you could use it instead of the "number of units in group" GUI one. It would look like this in HC Start:
  • Actions
    • Set VariableSet HC_Unit = (Triggering unit)
    • Unit Group - Add HC_Unit to HC_Group
    • Set VariableSet HC_TempData = (Custom value of HC_Unit)
    • Set VariableSet HC_Level[HC_TempData] = (Level of HC_Ability for HC_Unit)
    • Set VariableSet HC_Duration[HC_TempData] = HC_Countertime[HC_Level[HC_TempData]]
    • Special Effect - Create a special effect attached to the origin of HC_Unit using HC_Counterwait_SFX
    • Special Effect - Destroy (Last created special effect)
    • Custom script: if BlzGroupGetSize(udg_HC_Group) == 1 then
    • Trigger - Turn on HC_LoopTrigger
    • Custom script: endif
Same logic for HC Loop.

Nonetheless, Approved.
 
Seems pretty straightforward, simple, efficient and a decent idea.

I don't remember if in 1.32 there's the native BlzGroupGetSize, which basically gives you the amount of units in the group and it's more efficient than the one you're using, but you could use it instead of the "number of units in group" GUI one. It would look like this in HC Start:
  • Actions
    • Set VariableSet HC_Unit = (Triggering unit)
    • Unit Group - Add HC_Unit to HC_Group
    • Set VariableSet HC_TempData = (Custom value of HC_Unit)
    • Set VariableSet HC_Level[HC_TempData] = (Level of HC_Ability for HC_Unit)
    • Set VariableSet HC_Duration[HC_TempData] = HC_Countertime[HC_Level[HC_TempData]]
    • Special Effect - Create a special effect attached to the origin of HC_Unit using HC_Counterwait_SFX
    • Special Effect - Destroy (Last created special effect)
    • Custom script: if BlzGroupGetSize(udg_HC_Group) == 1 then
    • Trigger - Turn on HC_LoopTrigger
    • Custom script: endif
Same logic for HC Loop.

Nonetheless, Approved.
I'll check the native and update if I remember (I usually just forgot altogether). Pretty sure 1.32 got that one.
 
Top