• 🏆 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!

[Solved] Custom Item Ability Not Going on Cooldown

Status
Not open for further replies.
Level 3
Joined
Jan 27, 2017
Messages
13
Hey Guys,

I am trying to create an item similar to Kelen's Dagger of Escape but requires a friendly unit to teleport to. I used the channel ability and created the triggers for the functionality but when the item is used it is not put on cooldown. If I use the event A Unit Finishes Casting an Ability the cooldown works but the unit is not teleported (though the special effects still work). Is there something I am missing behind how items go on cooldown?

Trigger
  • Teleport
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Item Teleport
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set Item_TeleP = (Position of (Target unit of ability being cast))
      • Unit - Move (Casting unit) instantly to Item_TeleP
      • Custom script: call RemoveLocation(udg_Item_TeleP)
      • Set Item_TeleP = (Position of (Triggering unit))
      • Special Effect - Create a special effect at Item_TeleP using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_Item_TeleP)
Ability
nbZ7ckw.png


Item
RmdNOT8.png
 
Level 25
Joined
May 11, 2007
Messages
4,651
Wanna know an easier way of doing this? ;)
Use Archmage's Mass Teleport and set number of teleported units to 1 and set the delay casting time to 0.

The reason your item doesn't go in cooldown is because the unit is teleported instantly, for the trigger to work you would have needed to either add him to a unit group that you move every 0.03 seconds in a different trigger.
As in move unit once then remove it from the group.

Or

Find the custom script setPosX, setPosY and use that. However I couldn't find it on my short Googling.
 
Status
Not open for further replies.
Top