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

Orb of Annihilation cooldown problems.

Status
Not open for further replies.
Level 4
Joined
Jan 20, 2007
Messages
65
So, I got a hero with an ultimate ability based off Orb of Annihilation. Odd problem however. The spell has a 20 second cooldown. It works fine normally, however, whenever the unit auto-attacks, without having been ordered to attack by the player, the cooldown will not trigger, and the ability can be spammed.

Any tips?
 
Level 11
Joined
Feb 11, 2010
Messages
199
So, I got a hero with an ultimate ability based off Orb of Annihilation. Odd problem however. The spell has a 20 second cooldown. It works fine normally, however, whenever the unit auto-attacks, without having been ordered to attack by the player, the cooldown will not trigger, and the ability can be spammed.

Any tips?

I recommend coding an attack detection system yourself for such things, especially if you want a character to be able to have this ability and also use any other orb-based abilities.
 
Level 8
Joined
Jun 26, 2010
Messages
530
So, I got a hero with an ultimate ability based off Orb of Annihilation. Odd problem however. The spell has a 20 second cooldown. It works fine normally, however, whenever the unit auto-attacks, without having been ordered to attack by the player, the cooldown will not trigger, and the ability can be spammed.

Any tips?

You could make the ability a dummy and do a trigger that would do the effects of the ability itself.

  • Events
    • Unit - a unit takes damage
  • Condictions
    • Unit - attacking unit have ability Dummy Orb Of Annihilation
  • Actions
    • [insert effects of the ability here(ex: deal 200 dmg to attacked unit]
    • Ability - Remove Dummy Orb If Annihilation of attacking unit
    • Disable this trigger
    • Wait - 20 seconds
    • Enable this trigger
    • Ability - Add Dummy Orb Of Annihilation to attacking unit
That way you create a trigger that would apply to all players.

You can even add make an second dummy ability with same icon and description than the first and add it every time the realm dummy is removed so the second one replaces the first.
 
Level 4
Joined
Jan 20, 2007
Messages
65
I recommend coding an attack detection system yourself for such things, especially if you want a character to be able to have this ability and also use any other orb-based abilities.

Well, to be honest, I wouldn't want this ability to stack with other orb effects while active. It's an ultimate, so the effects are quite powerful as is. Could you possibly give an example of the attack detection system you're suggesting?

You could make the ability a dummy and do a trigger that would do the effects of the ability itself.

  • Events
    • Unit - a unit takes damage
  • Condictions
    • Unit - attacking unit have ability Dummy Orb Of Annihilation
  • Actions
    • [insert effects of the ability here(ex: deal 200 dmg to attacked unit]
    • Ability - Remove Dummy Orb If Annihilation of attacking unit
    • Disable this trigger
    • Wait - 20 seconds
    • Enable this trigger
    • Ability - Add Dummy Orb Of Annihilation to attacking unit
That way you create a trigger that would apply to all players.

You can even add make an second dummy ability with same icon and description than the first and add it every time the realm dummy is removed so the second one replaces the first.

Appreciate the response, however, I don't think this will work. It ignores whether or not the player has the ability active, does not add the damage of the hero to the spell, and will look a little sloppy with the spell disappearing and reappearing.


EDIT: I got a fix :). +Rep to all that helped.

For anyone interested or anyone that comes across this problem in the future, it's actually an extremely easy fix.

  • Fix
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to HeroWithSpell
    • Actions
      • Unit - Order (Attacking unit) to Attack (Attacked unit)
This doesn't interfere with his attack pattern and will ensure that the cooldown triggers when he attacks.
 
Level 8
Joined
Jun 26, 2010
Messages
530
It ignores whether or not the player has the ability active

I tought the ability was passive. If the ability is active give the unit a dummy passive ability while the ability is active ;p

does not add the damage of the hero to the spell

You mean the damage of the hero attack? The hero would do that by himself.

and will look a little sloppy with the spell disappearing and reappearing.

That was the reason of the second dummy ability. But if the ability needed activation only one dummy would do the job without any icon dessapearing.

Altough you won't need that trigger anymore haha

Man, your solution was very intersting. I tought your trigger would only be triggered after the damage calculation.
 
Status
Not open for further replies.
Top