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

Boots of Travel custom item not working

Status
Not open for further replies.
Level 2
Joined
Aug 24, 2021
Messages
8
Hi All,

Sorry, this is probably a super noob question but ive been trying to weeks to figure it out but its not working - searching forums people have similar but not exact problem im having.

All i have done is make a custom boots item and added the standard scroll of time portal mass teleport ability to it

Stats are all left normal so the hero becomes invulnerable during the channelling(why i didnt use Archmages mass teleport)

Everything works fine until i put a cooldown on the ability, It will start channelling, then immediately stop, apply the 60s cooldown and say 'unit cannot be teleported'

It seems like the 5 second casting time clashes with the cooldown and stops it?

Does anyone know how to fix this? essentially I am looking for a Boots of Travel that works like a scroll of town portal and has 60s cooldown, so:
  • Makes hero invulnerable during casting
  • Boots with Teleport ability
  • Teleport to townhalls
  • has 60s cooldown on the item

Does anyone know how to fix this?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
I don't know why it does that but this method works alright:
  • Start Cooldown
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Item Town Portal (Boots of Travel)
    • Actions
      • Unit - For Unit (Triggering unit), start cooldown of ability (Ability being cast) " over "60.00 seconds.
  • Prevent Dropping
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Scroll of Town Portal (Boots of Travel)
    • Actions
      • Custom script: local item i = GetManipulatedItem()
      • Custom script: call SetItemDroppable( i, false )
      • Wait 60.00 seconds
      • Custom script: call SetItemDroppable( i, true )
      • Custom script: set item i = null

The main issue here is that it doesn't work properly when you have multiple Scrolls of of Town Portal equipped. Maybe you could work around this by preventing the player from equipping two at a time. It also bugs out and resets the item cooldown if you drop the item, that's why I disabled dropping while on cooldown. It could also have some other unforeseen issues but none come to mind.

Another idea I have is to use two items. One is the Scroll of Town Portal that has the standard effects you desire (no cd) and the other is an item with a "fake" instant ability that does nothing but serve as a cooldown. When the unit Uses the item it becomes swapped with the "fake" version which is immediately activated and thus put on cooldown. They're then swapped back after the cooldown is finished. This probably has it's own slew of problems though.

Also, you could add Invulnerability to Archmage's Mass Teleport with triggers (begins casting -> add invuln / stops casting -> remove invuln). Two issues though, the Targets Allowed for the ability would need to be setup properly so that it couldn't target non-Town Hall structures. That and the ability can be interrupted prematurely.

All of that aside, I may be overlooking a simple solution.
 
Last edited:
Level 2
Joined
Aug 24, 2021
Messages
8
thanks ! That works.

I was so close! I had the event and condition on the trigger correct. Just couldn’t find / use the correct action
 
Status
Not open for further replies.
Top