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

Move Unit Instantly

Status
Not open for further replies.
I have this trigger for a custom Blink spell. The issue is that the cooldown does not get activated. I tried using a Wait 0.00 which solved the cooldown issue but then the unit is moved to the center of the map.

  • Blink
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blink (Naga Test)
    • Actions
      • Set TempLoc114 = (Position of (Triggering unit))
      • Set TempLoc130 = (Target point of ability being cast)
      • Special Effect - Create a special effect at TempLoc114 using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Special Effect - Create a special effect at TempLoc130 using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Unit - Move (Triggering unit) instantly to TempLoc130
      • Custom script: call RemoveLocation(udg_TempLoc114)
      • Custom script: call RemoveLocation(udg_TempLoc130)
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Instead of this,

Unit - Move (Triggering unit) instantly to TempLoc130

use these 2 lines

Custom script: call SetUnitX(GetSpellTargetX())
Custom script: call SetUnitX(GetSpellTargetY())

because Unit - move action pauses/stuns unit the moment you use it.
 
Instead of this,

Unit - Move (Triggering unit) instantly to TempLoc130

use these 2 lines

Custom script: call SetUnitX(GetSpellTargetX())
Custom script: call SetUnitX(GetSpellTargetY())

because Unit - move action pauses/stuns unit the moment you use it.

Thank you. Mark as solved.

  • Blink
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blink (Naga Test)
    • Actions
      • Set TempLoc114 = (Position of (Triggering unit))
      • Set TempLoc130 = (Target point of ability being cast)
      • Set Naga_Blink = (Triggering unit)
      • Special Effect - Create a special effect at TempLoc114 using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Special Effect - Create a special effect at TempLoc130 using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Custom script: call SetUnitX(udg_Naga_Blink,GetLocationX(udg_TempLoc130))
      • Custom script: call SetUnitY(udg_Naga_Blink,GetLocationY(udg_TempLoc130))
      • Custom script: call RemoveLocation(udg_TempLoc114)
      • Custom script: call RemoveLocation(udg_TempLoc130)
 
Status
Not open for further replies.
Top