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

Make a passive skill cooldown!

Status
Not open for further replies.
Level 4
Joined
Oct 20, 2011
Messages
129
I already know how to do that if caster still alive. But if caster dies (spell triggered when caster dies), that isn't work.
So someone HELP ME please!!
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
Are you gently requesting for help, or are you making some kind of abusive yelling saying "I have a problem so someone HELP ME" ?... Watch your words.

Give more details, what do you want to happen when the hero dies? You can't order a dead unit to cast. You would have to check the life of the unit, and if it's lower than 0.4 order the unit to cast the skill. (I doubt it works) Or create a dummy unit that does what you want...
 
So you want it such that when he revives (maybe via taverns or altars or whatever), the cooldown is still there? I don't think its doable...

unless you make a fake death in which instead of the unit actually dying, he is just hidden from view, shielded from any further damage etc... but that would require a resurrection system too
 
Level 4
Joined
Oct 20, 2011
Messages
129
Are you gently requesting for help, or are you making some kind of abusive yelling saying "I have a problem so someone HELP ME" ?... Watch your words.

Oh sorry :p English aren't my main language and I can't understand what I said.

So you want it such that when he revives (maybe via taverns or altars or whatever), the cooldown is still there? I don't think its doable...

unless you make a fake death in which instead of the unit actually dying, he is just hidden from view, shielded from any further damage etc... but that would require a resurrection system too

:goblin_cry:
 
Level 4
Joined
Oct 20, 2011
Messages
129
If the effect is triggered, you could save cooldown in a hashtable, with key (triggering unit). For non triggered abilities I don't think it's possible.

The spell is passive and trigger can't make it cooldown when unit dies. :goblin_boom:
However if the trigger could, it isn't necessary to save a real into hashtable.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Since you clain you have no problem doing what you are after when the unit is alive why do you not just prevent the unit from dieing to a fatal blow, do your cooldown stuff and then kill the unit (with a script enduced damage from what would have been the killing unit). Fidigety but sounds plausable.

You could also consider developing for StarCraft II where you have full control over cooldowns of all types.
 
Level 12
Joined
Nov 20, 2007
Messages
660
I think you can remove reincarnation after the hero revives (you may use Bribe's System to detect reincarnation) and add a fake reincarnation with cooldown based on Berserking and order your unit to cast it, then remove the "fake" reincarnation (after the cooldown ends, for this you have to count every second on variables) and add the real one back.
 
If he's using reincarnation, there no point in even triggering the cooldown of reincarnation...

I would really want to know what passive skill are you exactly trying to get a cooldown with...

but basically, you can just apply the above method... apply it once your unit is revived... though you would need some filters in case the unit dies while the ability is in cooldown...
 
Level 4
Joined
Oct 20, 2011
Messages
129
I think you can remove reincarnation after the hero revives (you may use Bribe's System to detect reincarnation) and add a fake reincarnation with cooldown based on Berserking and order your unit to cast it, then remove the "fake" reincarnation (after the cooldown ends, for this you have to count every second on variables) and add the real one back.



Maybe it's useful.

Chanel can be No Target (Instant cast)/ Unit Target/ Point Target/ AoE Target/ Passive
I wonder how to make it passive.
I'm looking for some spell like AoE damage upon death, Spawn Hydra... But they are invisible in the command card.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Oh! Sorry about the cooldown!. When the unit dies, you have to remove the passive, add a dummy skill with same cosmetics and add it to the unit, and order the unit to use it (skill does nothing), check the cooldown time with a timer, remove the fake ability, and add the passive again... Can't be easier, since Wc3 doesn't allow to handle cooldown with triggers.

If you can detect when the unit revives with reincarnation, yes. Just "Set life of Unit to 1", 0 would be death.
 
If the passive ability is not visible, you can just mimic cooldown via some variables...

when the unit dies and the ability is not on cooldown, activate it then set some variable to the value of the cooldown and reduce it by 1 every second... now if he dies again, check if the value of the variable is zero, and if yes, activate the ability effect, if not, let it be... and be sure to stop the timer loop from reducing the variable once it reaches zero...
 
Level 4
Joined
Oct 20, 2011
Messages
129
I don't want when the player click on the passive spell, it show "This spell is not ready..." So I want a REAL PASSIVE skill to cooldown. But if it's impossible, maybe I must replace an active (fake) spell and make it cooldown for the passive (real) one.
(I have already known how to do it)
 
Level 4
Joined
Oct 20, 2011
Messages
129
Oh sorry. I meant clicking on a fake passive spell which is an active spell.
(And if I want it invisible, I won't ask "How to make a passive spell cooldown")

Thanks for all of your help. Maybe I must let players get mess with interface when clicking on that spell.
=============================================
DotA's Ice Frog do it too lol
 
Status
Not open for further replies.
Top