HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Shared cooldown clock?

07-21-2006, 04:33 PM#1
Sardius
Is it possible to have two abilities share the same cooldown time clock?
07-21-2006, 04:48 PM#2
TigerBlud
Yeah, of course... Just set the cooldown of one ability to the same time as the other one.
07-21-2006, 05:27 PM#3
Sardius
Sorry, I didn't really mean it like that, I phrased it completely wrong, I mean more as, saving the cooldown time of an ability...

For example, I have two abilities, call familiar and revive familiar, when your familiar is alive you have a low mana cost skill that casts quickly with little cooldown time... When your familiar dies, revive familiar replaces it, which has a heavier mana cost and cooldown time... When your familiar is revived the skill swaps back again to Call Familiar... But I want the cooldown time to be remebered...

Its 90 seconds on revive familiar, but if you revive, and your familiar dies again right away, the cooldown time is not saved or remebered and you can revive it again instantly, I want the cooldown time to be remebered so you can only ressurect your familiar once every 90 seconds...
07-21-2006, 06:32 PM#4
Alevice
You'd have to call both a the same time. Probably return mana back and prevent the other one to finish casting.
07-21-2006, 06:57 PM#5
Fireeye
Well, i propably have a Solution, but there's 1 Question before i'm sure it is what you want, do you replace the familiar when he dies or not?
07-21-2006, 07:16 PM#6
Sardius
What do you mean by replace?

Basicly when the hero dies, the familiar dies... The familiar can also die on its own... The familiar is a set hero... The main hero can call the familiar back to him when the familiar is alive... When the familiar dies the hero needs can re-summon the familiar, and it revives at the heroes side... He is a hero uses "Unit - A unit owned by Player 1 (Red) Finishes reviving"

Basicly I just want it so the cooldown clock of the "Revive Familiar" is remebered after the skill is removed from the hero and replaced by "Call Familiar" So if the familiar dies again right away, you'll have to wait out the cooldown time before reviving him again.

And I donno if I could call both at the sametime, would that not use two ability slots on the heroes bar? I have no room left on the heroes bar... Hence why revive familiar replaces call familiar when it dies, and vice versa.
07-21-2006, 07:49 PM#7
Fireeye
ah ok, i solved the problem, i hope it's what you want, the map is attached.
How it works:
I've created 1 Dummy Unit with 91 HP (Cooldown + 1), when the ability is casted the hp is set to 1 and he gain 1 hp every sec, when he has 91 hp and your unit dies again, the revive ability will be added again.
Sorry, but the triggers aren't perfect.
Attached Files
File type: w3xRevive Sys.w3x (14.3 KB)
07-21-2006, 07:57 PM#8
moyack
I think that I get the Sardius' idea. He needs that two abilities share one common cooldown timer, like when you have in items two healing potions, if you activate one potion, you can't use the other potion inmediately. I think that the answer for your problem is in those items' abilities. I think that it can be done creating two abilities based on the same base ability (not recommended unless your base unit is channel).

Probably, if you create your abilities based on healing potion, you will get the behaviour you want. If it works, please let me know. :)
07-21-2006, 08:01 PM#9
Fireeye
What he wants is, the familiar dies, then the skill "revive" ist added, when he cast it, the familiar revies and the "revive" is removed, when the familiar dies again, let's say after 10 secs, he can instantly revive him, but he want to wait 80 secs before it's possible to revive. (90 secs)

---Edit---
You can also use an Integer/Real instead of a dummy unit, what needs more memory?
07-21-2006, 11:13 PM#10
Sardius
OK! Got it... Mostly...

Basicly what I do is have the hero learn and cast the new ressurect familiar skill right after the familiar dies, but the trigger to revive the familiar doesn't get turned on until that plays through, so when the familiar dies, you have a 60 second cooldown clock before you can actually revive the familiar... Works fine, but is there anyway I can prevent it from taking a double hit of mana for using the skill twice? If I set the mana of the hero to say +100 before the spell and they are at max mana it wont do anything, if I do +100 after the spell and they don't have enough mana, then the spell wont cast.
07-22-2006, 08:43 AM#11
The)TideHunter(
You could set the custom value of the unit to its extra mana, then every a periodic event to check if the mana is max, if it isent drain the custom value of the unit until the unit is max mana again or the custom value is >=0
07-22-2006, 05:23 PM#12
Sardius
Well I tried this, it works but only if I put like a 1 wait delay before and after the skill is cast, which confuses me because the casting time of the skill is set to 0... Anyway I can do it without the delay? Because when I try it like this it doesn't work. Don't mind the summon quill beast, thats what my revive fam skill is based off of.

Trigger:
Familiar Dies
Collapse Events
Unit - A unit owned by Player 1 (Red) Dies
Collapse Conditions
(Dying unit) Equal to Sword Spirit 0000 <gen>
Collapse Actions
Unit - Remove Call Familiar from Paladin 0020 <gen>
Unit - Add Revive Familiar to Paladin 0020 <gen>
If ((Mana of Paladin 0020 <gen>) Less than 100.00) then do (Unit - Set mana of Paladin 0020 <gen> to ((Mana of Paladin 0020 <gen>) + 100.00)) else do (Do nothing)
Unit - Order Paladin 0020 <gen> to Neutral Beastmaster - Summon Quilbeast
If ((Mana of Paladin 0020 <gen>) Greater than or equal to 100.00) then do (Unit - Set mana of Paladin 0020 <gen> to ((Mana of Paladin 0020 <gen>) + 100.00)) else do (Do nothing)
Wait 5.00 seconds
Trigger - Turn on Revive Familiar <gen>
07-24-2006, 07:20 PM#13
Sardius
Only reason I'm concerned about having a .5 second delay between the using of the ability and the returning of mana is that if the hero issues an ability in that half a second that drops your mana below 100 it'll screw up the mana return.

But the other problem that occurs in my method is it interupts what the hero is currently doing, something I don't want... I guess there is no trigger to trigger an abilities cooldown clock without using the skill itself.
07-24-2006, 07:31 PM#14
Thunder_Eye
I might know a solution where you can have the cooldown clock going instead of using dummy units and shit, just gonna test it to make sure.
EDIT:
Yeah I think I found the solution to make it exactly how you want it, instead of removing the ability, you just disable it, then when it is "readded", you enable it.
The cooldown clock will still go on its own even thou the ability is disabled.
07-24-2006, 09:42 PM#15
Sardius
Hm a cool solution! Should help if I move back to my original planned method, which I may do, although I am currently trying to approach this issue from a different perspectuve... Basicly what I am trying to do is make it so whenever the familar dies, it cannot be revived for 60 seconds... So basicly to have the ability start with its cooldown time enabled...

So it dies, you get the revive familiar skill but have to wait 60 seconds for the cooldown time to finish before reviving. This is what I would like the do mainly! Your solution does indeed solve my original method, which is great, but if anyone has a solution to make second method, that would be even greater!

I've already tried this method.

Trigger:
Familiar Dies
Collapse Events
Unit - A unit owned by Player 1 (Red) Dies
Collapse Conditions
(Dying unit) Equal to Sword Spirit 0000 <gen>
Collapse Actions
Unit - Remove Call Familiar from Paladin 0020 <gen>
Unit - Add Revive Familiar to Paladin 0020 <gen>
If ((Mana of Paladin 0020 <gen>) Less than 100.00) then do (Unit - Set mana of Paladin 0020 <gen> to ((Mana of Paladin 0020 <gen>) + 100.00)) else do (Do nothing)
Wait 0.05 seconds
Unit - Order Paladin 0020 <gen> to Neutral Beastmaster - Summon Quilbeast
Wait 0.50 seconds
If ((Mana of Paladin 0020 <gen>) Greater than or equal to 100.00) then do (Unit - Set mana of Paladin 0020 <gen> to ((Mana of Paladin 0020 <gen>) + 100.00)) else do (Do nothing)
Wait 5.00 seconds
Trigger - Turn on Revive Familiar <gen>

This works but there are complication because it involves using the skill and returning the mana as soon as the familiar dies... But this interupts whatever your hero is currently doing, which I don't want to occur...