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

Attack spell won't work

Status
Not open for further replies.
Level 52
Joined
Dec 8, 2008
Messages
4,371
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: 58
Last edited:
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 52
Joined
Dec 8, 2008
Messages
4,371
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