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

Dagger Strike v1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Warden strikes the enemies that near him for 300 AoE, dealing physical damage.|n|cffffcc00Level 1|r - 200 damage.|n|cffffcc00Level 2|r - 300 damage.|n|cffffcc00Level 3|r - 400 damage.|n|cffffcc00Level 4|r - 500 damage.|n|c0000ffcaCooldown: 10 seconds|r
[hide=My trigger]
  • Events
    • Unit - A unit Stops casting an ability
  • Conditions
    • (Ability being cast) Equal to Dagger Strike
  • Actions
    • -------- Variables --------
    • Set DS_Caster = (Casting unit)
    • Set TempPoint = (Position of DS_Caster)
    • Set DS_Target = (Units within 300.00 of TempPoint matching ((((Matching unit) belongs to an enemy of (Owner of DS_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))
    • Set DS_Level = (Level of Dagger Strike for DS_Caster)
    • -------- Damage --------
    • Set DS_Damage[DS_Level] = (100.00 + (100.00 x (Real((Level of Dagger Strike for DS_Caster)))))
    • -------- Damage Dealt --------
    • Unit Group - Pick every unit in DS_Target and do (Actions)
      • Loop - Actions
        • Animation - Play DS_Caster's Attack 1 animation
        • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
        • Unit - Cause DS_Caster to damage (Picked unit), dealing DS_Damage[DS_Level] damage of attack type Spells and damage type Normal
        • Special Effect - Destroy (Last created special effect)
    • -------- Remove Leaks --------
    • Custom script: call RemoveLocation(udg_TempPoint)
    • Custom script: call DestroyGroup(udg_DS_Target)
[/hide]

Fixes the leaks



Keywords:
Dagger,Strike,Panda,Rexxar,Warden,Slam,Damage
Contents

Dagger Strike v1.1 (Map)

Reviews
07:43, 13th Aug 2013 Magtheridon96: There are memory leaks in here. Doomlord's Review You may want to have another trigger that runs on map initialization with the purpose of setting the spell constants like the special effect path, the...

Moderator

M

Moderator

07:43, 13th Aug 2013
Magtheridon96: There are memory leaks in here.

Doomlord's Review

You may want to have another trigger that runs on map initialization with the purpose of setting the spell constants like the special effect path, the attachment point, etc...
This makes it easier for users to modify a spell without having to touch any of the code that actually executes the spell.

Check this out as well.

Purge: Although the memory leaks have been fixed, I feel like this spell is a bit too simple. Don't take it as offensive though, it is definitely a step in the right direction. :)

The only issue is that this spell has too little complexity to be accepted as useful. I'm sorry. ;(
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

  • Dagger Strike
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Dagger Strike
    • Actions
      • -------- Variables --------
      • Set DS_Caster = (Casting unit)
      • Set DS_Target = (Units within 300.00 of (Position of DS_Caster) matching ((((Matching unit) belongs to an enemy of (Owner of DS_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Set DS_Level = (Level of Dagger Strike for DS_Caster)
      • -------- Damage --------
      • Set DS_Damage[DS_Level] = (100.00 + (100.00 x (Real((Level of Dagger Strike for DS_Caster)))))
      • -------- Damage Dealt --------
      • Unit Group - Pick every unit in DS_Target and do (Actions)
        • Loop - Actions
          • Animation - Play DS_Caster's Attack 1 animation
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
          • Unit - Cause DS_Caster to damage (Picked unit), dealing DS_Damage[DS_Level] damage of attack type Spells and damage type Normal
          • Special Effect - Destroy (Last created special effect)
REVIEW
[tr][td]
rating_none.gif


Resource Status: Needs Fix
GENERAL
  • Descriptions is missing in the spell thread.
PROS
  • None.
CONS
  • Spell is too simple. Because it is an instant spell, it is MUI by default.
  • You are leaking the unit group. Fix it like this
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in DS_Target and do (Actions)
      • Loop - Actions
        • Animation - Play DS_Caster's Attack 1 animation
        • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
        • Unit - Cause DS_Caster to damage (Picked unit), dealing DS_Damage[DS_Level] damage of attack type Spells and damage type Normal
        • Special Effect - Destroy (Last created special effect)
  • You are leaking a location in (Position of DS_Caster). Cache it and clear it later. Read: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
  • Using an array for DS_Damage is unnecessary.
[/TD][/tr]
That is all I can see for now. Feel free to speak up if you feel like I misread your code somewhere :)
 
Top