• 🏆 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 spell appear on cooldown

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2015
Messages
283
Is there a way to make a spell appear to be on cooldown but still able to be cast?

I have a spell which has charges. I want the spell to still be able to be cast but for a charge refresh to be visible.

In DotA 2 the heros have buffs with stacks and you can see the cooldown on the buffs but I don't think something like this is possible in WC3.
 
There are progress bar systems that do something similar. You can do this with an item pretty easy. But, you want to have say 3 charges and each has a cooldown of say 30 seconds. So you could fire 3 off very fast but then you would have to wait 30 seconds, or alternatively, you could fire one every 10 seconds?

You could even use floating text like so:

llllllllllllllllllllllllll
But it sounds like you want it to show over the spell icon. Right?

Why not use 3 spells? Each would be idential to the last except they would say (x) charges left.
You could even make custom icons with the number in the corner.

images


You would have to custom trigger the cooldowns but it can be done.
You fire the spell once with full charges. Spell3
The remove Spell3 from unit and add ability Spell2, with the same level as Spell3.
Each one will need a different ability ID so that the cooldown does not transfer.
Once you get to Spell0 then you have a cooldown. the other cooldowns would not appear though.

Hmmmm. There's probably a better way.... I just can't think of it.

EDIT:
check it out. I did it, but it's not MUI :(
Someone with more skill than I could make it MUI but it would take me way too long.
Charged%20Spell%20GIF.jpg

Charged Spell System v.01.w3x
 
Last edited:
Level 7
Joined
Nov 19, 2015
Messages
283
Why not use 3 spells? Each would be idential to the last except they would say (x) charges left.
You could even make custom icons with the number in the corner.

images


You would have to custom trigger the cooldowns but it can be done.
You fire the spell once with full charges. Spell3
The remove Spell3 from unit and add ability Spell2, with the same level as Spell3.
Each one will need a different ability ID so that the cooldown does not transfer.
Once you get to Spell0 then you have a cooldown. the other cooldowns would not appear though.

Hmmmm. There's probably a better way.... I just can't think of it.

I heard that the progress bar systems are buggy and not that great. I havn't tried it yet but I won't use it for this since I wanted to make a system where I can make any spell have charges. Don't really want the floating text thingy either.

I already thought of the multiple abilities.
I was hoping not to have to do that since I need multiple spells and icons. I have learnt something interesting tho.
So when you add an ability, and the ID is the same as a spell on CD it will be on CD too? If that is the case, I can just cycle through the spells. I won't need a timer to detect when it is off cooldown. Thanks

Also, is there a way to put a spell into cooldown without having to cast it? Is there a way to detect if a spell is on cooldown?
 
I heard that the progress bar systems are buggy and not that great. I havn't tried it yet but I won't use it for this since I wanted to make a system where I can make any spell have charges. Don't really want the floating text thingy either.

I already thought of the multiple abilities.
I was hoping not to have to do that since I need multiple spells and icons. I have learnt something interesting tho.
So when you add an ability, and the ID is the same as a spell on CD it will be on CD too? If that is the case, I can just cycle through the spells. I won't need a timer to detect when it is off cooldown. Thanks

Also, is there a way to put a spell into cooldown without having to cast it? Is there a way to detect if a spell is on cooldown?

You should test these things. I just know that if you use a potion then pick up a new one, the cd from the old one is applied to the new one. I assume this happens with abilities too since, if you have 2 abilities with the same ID, casting one will set the cd on the other. I just read somewhere that removing and adding an ability resets the cooldown, so I'm not sure.

The progress bars systems might be buggy, but I recommend making your own. It could be simple/efficient and do exactly what you want. Floating text can look really good in-game. check it. See those bars, they are floating text. Looks just like a default bar. It's my Hp Bar System in the signature.

Anyway, the real answer to your question is "no." You cannot cast a spell that is cooling down.

My floating text idea would work like this:
example

Spell on full power
lllllllllll lllllllllll lllllllllll
After first Cast
lllllllllll lllllllllll lllllllllll
Each sencond, it would grow.
lllllllllll lllllllllll lllllllllll
Until you cast agian, then...
lllllllllll lllllllllll lllllllllll
And finally...
lllllllllll lllllllllll lllllllllll
Now you are unable to cast, until it gets higher.
You can't "detect" if a spell is on cd, but you can know that it is.
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/cooldown-detect-229387/

You also can't detect when there is an attempt to cast a spell on cooldown.
http://www.hiveworkshop.com/forums/triggers-scripts-269/detecting-not-enough-gold-252834/

You can create a custom cooldown. Though, I'm not sure why you would.
http://www.hiveworkshop.com/forums/lab-715/system-cooldown-265475/

Finally, this will get you triggered cooldowns, but you will lose your cd indicator.
http://www.hiveworkshop.com/forums/spells-569/passive-cooldown-system-gui-friendly-v1-03-a-270884/

Which brings us back to, yes, you can make the spell work this way, but you will need to supply some other indicator system. Buffs work (progress bars), floating text, or just swapping spells.

You could probably make about 12 icons and animate them in a spell system to mimic the cooldown indicator. Like this:
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    3.5 KB · Views: 243
  • Untitled3.jpg
    Untitled3.jpg
    3 KB · Views: 232
  • Untitled2.jpg
    Untitled2.jpg
    2.7 KB · Views: 284
  • Untitled1.jpg
    Untitled1.jpg
    2.6 KB · Views: 219
Level 7
Joined
Nov 19, 2015
Messages
283
Thanks for the info. Im going to have to evaluate how much I want it against how much work I want to do.

It was nice knowing my options tho. Thanks
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Also, is there a way to put a spell into cooldown without having to cast it? Is there a way to detect if a spell is on cooldown?
No, no.

Unless you create everything yourself.
You can use a Spell Shield to replace your ability with it, simulating the cooldown and having it start/stop by triggers.
That way, you always know if something is on cooldown or not, can activate the cooldown without having to cast it (also works while stunned), make the cooldown last X seconds (can be calculated per instance via script), etc.

There might be a way to do it by simulating your ability with a hidden ability... But clicking on the icon would not work when it is recharging but the hotkey would work.
 
Level 7
Joined
Nov 19, 2015
Messages
283
No, no.

Unless you create everything yourself.
You can use a Spell Shield to replace your ability with it, simulating the cooldown and having it start/stop by triggers.
That way, you always know if something is on cooldown or not, can activate the cooldown without having to cast it (also works while stunned), make the cooldown last X seconds (can be calculated per instance via script), etc.

There might be a way to do it by simulating your ability with a hidden ability... But clicking on the icon would not work when it is recharging but the hotkey would work.

Im think of creating multiple icons which display the number of charges. Im having trouble arranging the cooldowns and the charges displayed. I guess I can just add/remove the ability to refresh it and have zero charges left as the spell shield. I assume, you make spell shield only block allied spells and have a dummy cast a spell at it. What is a good spell base and also is there a chance that it may interrupt other spells?

How do you do this hidden ability thing? I tried testing it not too long ago with a disabled spell book because I wanted to hotkey item slots. It didn't work tho unless I did something wrong.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
A spell book puts its content in a different chart.
You cant use abilities from that chart.
However, if you have 13 abilities, one is not shown... but still on that chart.
I havent tested it myself and should have done so, but if you hide an icon by (-1, -1), then it might work.
 
Level 7
Joined
Nov 19, 2015
Messages
283
A spell book puts its content in a different chart.
You cant use abilities from that chart.
However, if you have 13 abilities, one is not shown... but still on that chart.
I havent tested it myself and should have done so, but if you hide an icon by (-1, -1), then it might work.

Tested by adding extra spells (channel with different ID). Checked that all spells were on hero. Only 7 spells displayed, 8 if I got rid of attack UI (remove patrol). Spells not in chart could not be cast by hotkey. 8th spell appeared on chart after attack UI removed could be hotkey ordered.

Position set to -1,-1 crashes the game...

Did I do it wrong but thats what my test results are
 
Level 7
Joined
Nov 19, 2015
Messages
283
According to this, it should work fine.
However, it seems that you cant activate it by hotkey...

I guess this is a dead end. It does however make disabled spellbooks easier but will ruin the map for Macs.

Back to the original problem. I want to do it like what Legal_ease said in his first post. Wouldn't I need all the spell have the same ID rather than different? Also doesn't removing a sell and adding it back refresh the cooldown?
 
Level 15
Joined
Aug 14, 2007
Messages
936
An efficient way to make this system will be to use an actual ability like (Berserk) using the system to force cast it (checking for stun etc) making sure that hero is not silenced while doing so, sets the spell on cooldown. Which then comes the sacrificing of an ability slot, it's up to you ;3
 
Level 7
Joined
Nov 19, 2015
Messages
283
An efficient way to make this system will be to use an actual ability like (Berserk) using the system to force cast it (checking for stun etc) making sure that hero is not silenced while doing so, sets the spell on cooldown. Which then comes the sacrificing of an ability slot, it's up to you ;3

Exactly how do you force cast if the hero is stunned or silenced. I know how to check for it but that doesn't solve the problem
 
Level 7
Joined
Nov 19, 2015
Messages
283
that would be a bug this charge system suffer, you can include it in the tooltip to say that the charge will only activate when the hero is not stunned/silence etc. We are talking about cheap and efficient way of making custom spells here ;)
This helps in no way. I dont want cheap in my map

I highly advise you to check this
It does exactly what your title ask for. It is extremely important that you check the demo map.
I've already checked this out before. Are there any limitations? In the posts it seems you fixed some but not sure if everything working.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Why use berserk? Just use the Spell Shield like wiet said. It bypasses the issue since it doesn't require anything from the "caster" because the real caster would be the dummy unit using a spell to fire the cooldown of spell shield instead...

Every time the cooldown end and the charges are not full, the dummy unit fires an instant single target spell and sets spell shield on cooldown again. When all charges are back remove spell shield until the real spell is cast once again.

The only issue would be that while the hotkey would work, clicking on the icon with the mouse wouldn't. (Which wouldn't work anyway with any other spell because you can't use abilities that are on cooldown...)

The "real" ability that is used would be based out of channel so you can hide it but still use your hotkey by not checking the "visible" box in object editor.
 
Level 7
Joined
Nov 19, 2015
Messages
283
Yep in the demo you need the accurate system along with dummy spells ;p

I don't think you understand what limitations mean. I want to know if there is something this system cannot do or has problems with. Of course I need to implement the system and add the dummy spells, thats how most people install system.

@Deathadder - You gave me an awesome idea. Channel hotkeys still work if you set it to visible flase? Im going to test it now. Thanks
BTW what is a good base for an instant single target spell to trigger the spellshield. Im worried that it the moment I cast it, I receive the spell shield but get hit by another spell just before the dummy unit hits with the single target spell. The spell shield would then block the enemies spell which is not what I want.

@Flux - I tested out the demo map. When the hero with invisibility gets attacked, the invis is broken. Is this a limitation of your system or does windwalk geet canceled when you get attacked?
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
I guess this is a dead end. It does however make disabled spellbooks easier but will ruin the map for Macs.

Back to the original problem. I want to do it like what Legal_ease said in his first post. Wouldn't I need all the spell have the same ID rather than different? Also doesn't removing a sell and adding it back refresh the cooldown?

set buttonpos=-2147483648,-2147483648
its MAC safe
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
Im worried that it the moment I cast it, I receive the spell shield but get hit by another spell just before the dummy unit hits with the single target spell. The spell shield would then block the enemies spell which is not what I want.

event - unit spell effect
action - do w/e you need, then add spell shield, create enemy dummy and throw anything at the hero. delete spell shield with known timer (cd)
ther are no chance of collision with any hostile spell

PS. didn't know here are no glue for multiposting. sad.
 
Level 7
Joined
Nov 19, 2015
Messages
283
event - unit spell effect
action - do w/e you need, then add spell shield, create enemy dummy and throw anything at the hero. delete spell shield with known timer (cd)
ther are no chance of collision with any hostile spell

PS. didn't know here are no glue for multiposting. sad.

Would there not be a delay from creating a unit and then ordering the unit to cast the spell before the spell actually hits.
 
Level 7
Joined
Nov 19, 2015
Messages
283
All is written there

Forgot to add that it also works on stunned units.

Not sure if you read this part.

- I tested out the demo map. When the hero with invisibility gets attacked, the invis is broken. Is this a limitation of your system or does windwalk get canceled when you get attacked?
 
Level 15
Joined
Aug 14, 2007
Messages
936
You fail to realize that when you create a unit you can set it's facing directly to face the target you want, also by placing it offset from the target it allows a flawless instant cast that will be solved by using a 0 missile speed (instant) storm bolt dummy that does 0 damage and next to no stun value (0.01).
 
Last edited by a moderator:
Level 7
Joined
Nov 19, 2015
Messages
283
You fail to realize that when you create a unit you can set it's facing directly to face the target you want, also by placing it offset from the target it allows a flawless instant cast that will be solved by using a 0 missile speed (instant) storm bolt dummy that does 0 damage and next to no stun value (0.01). Unfortunately with that ego I fail to calculate the success of your pathetic soul.

There is still a delay between casting the spell and the actual spell hitting the target. My maps has a lot of spells being cast and want to know the possibility of it interfering. Everything you have stated is already known and basic.

Can you get off your mighty horse and just STFU. Honestly, you seriously have a problem. I privately messaged you of examples of where you made no sense so that you are not embarrassed publicly. However you obvious just don't understand. Almost every post you have made makes no sense, repeating others, stating the obvious or plain getting mad at people. Others will start noticing what a nuisance you are soon.

Can someone else please tell me if they understand any of his posts or am I the crazy one?
 
Last edited by a moderator:
Level 12
Joined
Nov 3, 2013
Messages
989
You fail to realize that when you create a unit you can set it's facing directly to face the target you want, also by placing it offset from the target it allows a flawless instant cast that will be solved by using a 0 missile speed (instant) storm bolt dummy that does 0 damage and next to no stun value (0.01).

Is there a reason to set the facing instead of altering the dummy unit's required facing angle and save some trigger efficiency? (The part in unit editor where you can change so the unit doesn't have to face the target at all, which is already set to a default of 60 degrees.)

There is still a delay between casting the spell and the actual spell hitting the target. My maps has a lot of spells being cast and want to know the possibility of it interfering.

As for instant casting, if I remember correctly, there's no instant cast point target abilities. You either need the ability to be attached to an item, have the unit 0.00 casting point, or maybe it was both? As for the ability itself I'd either use channel or something like chain lightning/finger of pain to avoid the missile speed problem.

I think there might still be some delay (It should be really small if there is though.) but I'm not certain. If there is, it might be a good idea to first order the dummy spell to be cast and then add the spell shield afterwards to make it less likely to be hit by something else.

Can someone else please tell me if they understand any of his posts or am I the crazy one?

I haven't seen this guy around before, my activity is fairly sporadic though so there's no surprise if he's new, but I'm already sick of this guy. This completely toxic & offtopic basically doesn't qualify for anything else than spam...
 
Last edited:
Level 12
Joined
Nov 3, 2013
Messages
989
You obviously missed the point of the instant cast trick. <-- DeathAdder

So what is the point then? You were calling people ignorant and said that I'm wrong without pointing out where or why, which isn't helping at all.

As far as I know not having any facing restriction is more effective than to specifically set a facing angle every time. If there's something wrong with this, do tell, and I will take it back.
 
Level 12
Joined
Nov 3, 2013
Messages
989
creating the dummy with a facing eliminates the turning time, making dummy have 0 cast point allows instant cast like item, lastly, making the missile speed 0 allow instant missile hit.

Art - Propulsion Window (degrees) - 60.00 (Default)

^ if you increase this high enough the unit won't have to face the target to begin with so there's no need for any turning. This should be objectively better since you wouldn't require any getter functions for the facing angle.
 
Level 7
Joined
Nov 19, 2015
Messages
283
Is there a reason to set the facing instead of altering the dummy unit's required facing angle and save some trigger efficiency? (The part in unit editor where you can change so the unit doesn't have to face the target at all, which is already set to a default of 60 degrees.)

Yea, I think he thinks he is so clever that you can make a dummy face the target to eliminate turning time. I think I'm just going to ignore him from now on.

As for instant casting, if I remember correctly, there's no instant cast point target abilities. You either need the ability to be attached to an item, have the unit 0.00 casting point, or maybe it was both? As for the ability itself I'd either use channel or something like chain lightning/finger of pain to avoid the missile speed problem.

I think there might still be some delay (It should be really small if there is though.) but I'm not certain. If there is, it might be a good idea to first order the dummy spell to be cast and then add the spell shield afterwards to make it less likely to be hit by something else.

Thanks I just wanted to know if there would be a small delay even if very insignificant. I have some spells that activate when a unit nearby casts a spell. So if they cast whatever spell there would be two dummy units. One for the spell and one for the enemies spell. I'm just hoping the closer dummy unit would hit first. I'm not sure how timing works when everything happens at the same time (0seconds).


@kingkwong
Are you refering to Warden? That's because the demo makes Warden's Blink go into cooldown each time she is damaged that's why her Invi is removed.
Yea, I understand the cooldown is supposed to reset when she takes damage. But I don't understand why the invis is being removed? I was reading in some comments that you had problems with some buffs being removed. Sorry, I didn't read all of it. Is it intentional that the invis gets removed? Can youu prevent this if you wanted to? I can't seem to find any triggers relating to remove the invis when damaged.
 
Level 7
Joined
Nov 19, 2015
Messages
283
No, the invi being removed is a side effect. Unfortunately, you can't prevent this.
It no longer has problems with buffs.

I read that you fixed the buff thing by adding another buff so that it got removed instead.

Just tested that removing the windwalk buff cancels the invis, would it be possible to add another buff that get removed instead of the invis buff?

Obviously I am not the creator like you and have no real idea what is going on. Im just suggesting a possibility although you have probably already done all the tests.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
Just tested that removing the windwalk buff cancels the invis, would it be possible to add another buff that get removed instead of the invis buff?

That would reset the buff. Example, Wind Walk time remaining = 1 sec, ability is triggered to cooldown, applying a new buff will make the invi last its full duration again. Also, there are a lot of invisibilities like Permanent Invi, Invi from Sorceress, Meld, Wind Walk, etc. So pretty much impossible.

Why do you want to not keep the invisibility by the way? Since the unit "activates" a passive ability, it makes sense to remove the Invi.
 
Level 7
Joined
Nov 19, 2015
Messages
283
Sorry, I didn't realise how you solved the other buff issues. I thought that you added another buff that got removed so the original stayed intact.

Well it cool when you activate a passive and it goes on cooldown.

However in some cases such as you are invis and you walk pass some AOE damage or something. This will break the invis which I don't want.
 
Status
Not open for further replies.
Top