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

[Help] Blink to enemy spell

Status
Not open for further replies.
Level 3
Joined
Mar 25, 2008
Messages
56
ok so i wanna cast a spell that when i start casting,i move instantly to enemy and create animation(that i know)

currently my trigger is
  • stormbolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Death Stab
    • Actions
      • Unit - Move (Triggering unit) instantly to (Position of (Targeted unit))
      • Special Effect - Create a special effect at (Position of (Targeted unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
but my hero does not move to the unit instantly,help please? thanks
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
And use "a unit FINISH casting an ability"

No!!
Starts the effects of an ability is much better.

Your Fixed up trigger ( it still could be optimized 'more' by using jass functions, although I'm not going to get into it right now since this works fine too ) :

  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Death Stab
  • Actions
    • Custom script: local location pos = GetUnitLoc(GetSpellTargetUnit())
    • Custom script: call SetUnitPositionLoc( GetSpellAbilityUnit(), pos )
    • Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
    • Custom script: call RemoveLocation (pos)
    • Custom script: set pos = null
This should work, if not tell me.
You just need to copy everything of the new actions.
Just open up custom script, and add those lines like I did.
 
Status
Not open for further replies.
Top