1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Starting Item Cooldown

Discussion in 'World Editor Help Zone' started by Kaijyuu, Jun 4, 2018.

  1. Kaijyuu

    Kaijyuu

    Joined:
    Jun 2, 2004
    Messages:
    848
    Resources:
    0
    Resources:
    0
    So I have an item that has some triggered effects (prevents damage every 25 seconds), and mechanically it's working perfectly. However, I'd like the item to show a cooldown.

    Any tricks to starting an item cooldown? I tried giving it a dummy active ability that doesn't do anything and then a dummy rune with the same cooldown group, but it didn't work.
     
  2. Jampion

    Jampion

    JASS Reviewer

    Joined:
    Mar 25, 2016
    Messages:
    1,287
    Resources:
    0
    Resources:
    0
    To show the cooldown, the ability with the cooldown has to be the first ability in the ability list if I recall correctly.
    You can either use an active ability and trigger it or use spell shield (passive ability).

    Use an ability based on berserk, so no animation is needed and no orders are interrupted.
    To prevent the player from using the item.
    • Prevent Manual Use
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Berserk (item)
      • Actions
        • Item - Remove (Item carried by (Triggering unit) of type Berserk)
        • Hero - Create Berserk and give it to (Triggering unit)

    If you want to trigger item usage:
    • Use on Event
      • Events
        • Player - Player 1 (Red) skips a cinematic sequence
      • Conditions
      • Actions
        • Trigger - Turn off Prevent Manual Use <gen>
        • Hero - Order Blood Mage 0002 <gen> to use (Item carried by Blood Mage 0002 <gen> of type Berserk)
        • Trigger - Turn on Prevent Manual Use <gen>

    Using the item will cancel channeling spells.

    There are only very few passive ability that show a cooldown.
    Spell shield and reincarnation are the only ones I can think if right now. Reincarnation is not useful, but I am sure you can use spell shield for that.

    Use 2 items, one with spell shield, one with no ability. If you want to block damage, replace the item with the spell shield item and use a dummy to trigger cooldown. When the cooldown is over replace the item with the no ability item. In theory the unit should never have active spell shield, as it is either on cooldown or the unit has the other item.
     
  3. BloodSoul

    BloodSoul

    Joined:
    May 10, 2009
    Messages:
    865
    Resources:
    2
    Spells:
    2
    Resources:
    2
  4. Kaijyuu

    Kaijyuu

    Joined:
    Jun 2, 2004
    Messages:
    848
    Resources:
    0
    Resources:
    0
    The Cargo Hold thing worked perfectly. Thanks!

    I remembered seeing that tutorial a year or so ago, but didn't remember it could be used with items.