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

Attack spell won't work

Status
Not open for further replies.
Level 51
Joined
Dec 8, 2008
Messages
4,358
Hey guys.

I've tried out this tutorial Link out several times now, but it never worked for me.

I copied everything exactly, checked everything a few times now. The unit triggers the action, it makes the attack animation bot nothing happens after that.
No damage, nothing.

Can anyone explain that?

  • Melee
    • Ereignisse
      • Einheit - A unit starts the effect of a ability.
    • Bedingungen
      • (Ability being cast) equal Meele Attack
    • Aktionen
      • -------- I'll create some variables at first to make things easier. --------
      • Set MeleeCaster = (Triggering unit)
      • Set MeleePoints[1] = (Position of MeleeCaster)
      • Set MeleePoints[2] = (MeleePoints[1] offset by 50.00 towards (Facing of MeleeCaster) degrees)
      • -------- Now let's create a dummy to cast the damage that we has just created. --------
      • Einheit - Create 1 Dummy for (Owner of MeleeCaster) at MeleePoints[2] facing Vorgabe für Gebäude-Ausrichtung degrees
      • Set MeleeDummy = (Last created unit)
      • -------- I'm adding expiration time to make it disappear after 0.5 second, and give it an ability. --------
      • Einheit - Add a 0.50 second Standard expiration timer to MeleeDummy
      • Einheit - Add Meele Attack to MeleeDummy
      • -------- It's time to cast them! So let's add this action. --------
      • Einheit - Order MeleeDummy to Nachtelf-Wächterin - 'Dolchfächer'
      • -------- Time to remove leaks in order to prevent ingame lags. --------
      • Custom script: call RemoveLocation(udg_MeleePoints[1])
      • Custom script: call RemoveLocation(udg_MeleePoints[2])
      • -------- You're done! --------
      • -------- Q: Why do you use Warden - Fan of Knives ability to order dummy cast spells? --------
      • -------- A: Because we the melee damage spell was based from Fan of Knives. --------
Edit: I'm uploading the map cause there are several things that could bug it.
 

Attachments

  • Twilights Dawn.w3x
    1.8 MB · Views: 56
Last edited:
Level 29
Joined
Mar 10, 2009
Messages
5,016
I suggest you use a damage calculator instead of making a dummy unit...

http://www.hiveworkshop.com/forums/jass-resources-412/snippet-damage-calculator-218405/
This will work...
  • Melee Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Meele Attack
    • Actions
      • -------- I'll create some variables at first to make things easier. --------
      • Set MeleeCaster = (Triggering unit)
      • Set MeleePoints[1] = (Position of MeleeCaster)
      • Set MeleePoints[2] = (MeleePoints[1] offset by 80.00 towards (Facing of MeleeCaster) degrees)
      • -------- Calculate the damage first --------
      • Custom script: set udg_Dam = DamageCalculator.getHeroDC(GetHeroInt(udg_MeleeCaster, false), 0, 2, 4)
      • -------- then damage the target(s) --------
      • Unit Group - Pick every unit in (Units within 60.00 of MeleePoints[2] matching (((Picked unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause MeleeCaster to damage (Picked unit), dealing Dam damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_MeleePoints[1])
      • Custom script: call RemoveLocation(udg_MeleePoints[2])
      • -------- You're done! --------
      • -------- Q: Why do you use Warden - Fan of Knives ability to order dummy cast spells? --------
      • -------- A: Because we the melee damage spell was based from Fan of Knives. --------
 
Level 51
Joined
Dec 8, 2008
Messages
4,358
I suggest you use a damage calculator instead of making a dummy unit...

Thanks mate I'll check that out.

The problem is really simple

  • Unit - Add Meele Attack to MeleeDummy
should be

  • Unit - Add Meele Damage to MeleeDummy

How.. that... that can't be.. I.. haha I'm getting blind. Thanks, it's working now. :)
 
Status
Not open for further replies.
Top