• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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