• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Spell] Cooldown trigger on defend deactivate

Status
Not open for further replies.
Level 4
Joined
Jul 26, 2017
Messages
66
So I'm using defend(Adef) to make a stealth ability that makes the user invisible then deals backstab damage on attack but I want it to trigger a cooldown afterwards so it can't be used to escape combat for a while. What should I do for that to happen? since putting a cooldown directly in the ability doesn't work and I want to be deactivatable too since stealth reduces movement speed
 
Level 4
Joined
Jul 26, 2017
Messages
66
Cause even if you change it the gameplay constants, you cannot toggle it off, which is pretty inconvenient if you're stuck at -60% movement speed
 
Level 13
Joined
Oct 12, 2016
Messages
769
Defend having no cooldowns I think is one of those hard coded things.
If it helps, Wind Walk is removed if the unit attacks or uses an ability. Maybe you could have some ability to exit stealth?
 
Level 8
Joined
Mar 19, 2017
Messages
248
Use a "2 ability" way, one based on Wind Walk, the second an instant dummy ability called, let's say Cancel Invisibility (put it just up from the Wind Walk one on the unit info card).
If the unit is a hero, you should add the dummy ability once Wind Walk is learned (otherwise give it directly to units that have the Wind Walk).
The effect of the ability should be removing the wind walk buff. Simple. You can make the dummy ability be based on Berserk so it doesn't interfere with the orders of the unit. You could potentially make it based on an auto-cast ability, ie. Frenzy, so the auto cast order makes the unit cancel the invisibility.

A custom cooldown can be possible too. My guess is this (don't know if it is the only possible way tho): you are basically using a spell effect event, in which you remove the casted ability, add a dummy ability with the same icon, tooltips, X/Y position, with the cooldown desired, and of course 0 mana cost, then issue the order of the dummy unit, and finally start a timer that after it's expiration will remove the dummy ability and will add the normal ability (reverse effect). Complex. If you need this ability to be MUI you will need either a looping timer to track all instances or simply one timer per unit. In general this approach only works properly if either 1. all unit's from the system have 0.00 cast point (best approach), 2. you're basing the dummy ability in a 0 cast point ability, like indeed Berserk/Fan of Knives. Otherwise players can just issue stop.
 
Level 4
Joined
Jul 26, 2017
Messages
66
First of all thank you guys for responding.
(However)
Wind Walk does deactivate if you do anything, so making a deactivate skill won't be a problem unless it's on a hero with 4 other Abilities, Also I have an ability that should be usable with stealth so I cant use Wind Walk either way.

The spell is a hero spell so if I remove it, add a similar looking spell and and add it after cooldown finishes, it will reset the level on the learning button, which is bad.

I guess what I need something like what disruptive_ has suggested but something that works for hero abilities and can be integrated into one skill, a custom cooldown for this one ability
 
Level 8
Joined
Mar 19, 2017
Messages
248
More complex than i thought.
The ability you are presenting presumably should do the following:
1. Effect: give invisibility and backstab damage on attack.
2. Toggle support.
3. Has cooldown.
4. You can cast abilities (or one specific ability) while the effect is on.
You already pointed out that WW is a no-no (by point 4, as you can solve 2 and 3 with a dummy autocast ability, without losing too much points in smoothness), so you have to assume that you will need to trigger this ability. Depending on how well you want to track the backstab you might need a damage detection system too, with spell damage diffentiation included.

What i'm thinking right now is using the Immolation ability (this can be toggled, supports cooldown, and a buff while active) with the spell effect beign adding permanent invisibility ('Apiv' or an custom version) to the caster. 1. To support the de-toggle you need another trigger to track the unimmolation order, here you remove the 'Apiv' ability. 2. You will need a timer to track the normal spell expiration (just like a buff) if it has one, but since you are using toggle mechanics, natural expiration is pointless and overkilling in complexity. 3. You must manually search the spells that make the spell expire early (remove the 'Apiv' here and/or Issue unimmolation), from those that not. 4. Finally, you need to use a attack/damage event, so you are also removing the (removing the 'Apiv' and/or issuing unimmolation) here, here you apply the backstab effect for units with 'Apiv' or with the immolation buff. My bet is that just issuing unimmolation will cover the detoggle effect since in point 1 is covered this, but who knows what Warcraft III engine has for us.
 
Level 4
Joined
Jul 26, 2017
Messages
66
Immolation was what I used as a dummy for this ability before defend but it triggers the cooldown on toggle on and off which makes it difficult to untoggle it immediately after toggling it. To clarify what I need help with I need a trigger that would initiate a cooldown everytime the Ability is untoggled or the hero attacks and deals backstab damage. Said backstab damage and stealth system is already triggered and working.
 
Level 4
Joined
Jul 26, 2017
Messages
66
So while bumping this thread let me just update it cause I discovered that Mana Shield's cooldown starts when you activate the ability and it can be deactivated while it is on cooldown so it can be used for this purpose but if I use it on my hero it could be very difficult to deal with it if it can do the backstab damage then immediately go back to stealth which is what I'm trying to avoid by having the cooldown be after it deals backstab damage. Still hoping somebody can teach me how to trigger a custom cooldown at a triggered event.
 
Status
Not open for further replies.
Top