• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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