• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Item question related with charges and cooldown

Status
Not open for further replies.
Level 4
Joined
Nov 7, 2010
Messages
68
Can somebody make a trigger or give me a general detailed idea about one(since I suck with triggers) that makes a certain item go on cooldown once all of its charges are spent?
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
As far as I know, there is no way to make an item/ability go on cooldown. The solution is to replace the ability/item with a fake ability (dummy ability) and make the unit use this ability/item to trigger a fake cooldown. After x seconds (once the cooldown has refreshed) you swop the ability back to the original.

May need more information on what your tying to do. Does the item's charges get refreshed after it cools down? Does it, after running out of charges, have a cooldown on each use?
 
Level 4
Joined
Nov 7, 2010
Messages
68
As far as I know, there is no way to make an item/ability go on cooldown. The solution is to replace the ability/item with a fake ability (dummy ability) and make the unit use this ability/item to trigger a fake cooldown. After x seconds (once the cooldown has refreshed) you swop the ability back to the original.

May need more information on what your tying to do. Does the item's charges get refreshed after it cools down? Does it, after running out of charges, have a cooldown on each use?

Yes, once charges reach 0 it goes on CD. When CD ends it has its original charges ready to be used again.
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
I would recommend making two items. One with one charge that has a cooldown and one with however many charges you want that doesn't. Once you use it check to see if there is only one charge left and then replace the item with the one with one charge and a cooldown so it will go on CD when you use it.

Catching it when the cooldown runs out to replace it with the one without CD might involve a timer.
 
Status
Not open for further replies.
Top