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

[Solved] Spell not working

Status
Not open for further replies.
Level 3
Joined
Jan 4, 2009
Messages
45
Hello guys. I just made a spell for my blademaster, and it is not working and I can't figure out why.

  • Twisting Slash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Twisting Slash
    • Actions
      • Set Tshalsh_loc = (Position of (Casting unit))
      • Unit Group - Pick every unit in (Units within 240.00 of Tshalsh_loc matching ((((Picked unit) is alive) Equal to True) and (((Owner of (Picked unit)) is an ally of (Owner of (Casting unit))) Equal to False))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Casting unit) to damage (Picked unit), dealing (4.00 + ((Real((Strength of (Casting unit) (Include bonuses)))) / 2.00)) damage of attack type Normal and damage type Normal
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\NightElf\NightElfBlood\NightElfBloodArcher.mdl
          • Special Effect - Destroy (Last created special effect)
      • Animation - Queue (Casting unit)'s stand animation
      • Unit - Set life of (Casting unit) to ((Life of (Casting unit)) - 3.00)
Yes, I know that the trigger leaks, I will fix that later. Now I need help to make this spell function. Thx very much.
 
  • Unit Group - Pick every unit in (Units within 240.00 of Tshalsh_loc matching ((((Picked unit) is alive) Equal to True) and (((Owner of (Picked unit)) is an ally of (Owner of (Casting unit))) Equal to False))) and do (Actions)
This line should actually looks like:
  • Custom script: sec bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 240.00 of Tshalsh_loc matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an ally of (Triggering player) Equal to False))) and do (Actions)
As you can see (Picked unit) should be replaced with (Matching unit), if you don't, all conditions will return false.
Follow Bribe's mention to improve efficiency, plus remove location leak after performing actions with RemoveLocation().
 
Level 3
Joined
Jan 4, 2009
Messages
45
It works now. I remade the spell in a different way and it works. Thanks for your help +rep.
 
Status
Not open for further replies.
Top