• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Bounty Hunter Dota

Status
Not open for further replies.
I'd use this method to handle the cooldown Passive ability with cooldown - Best method!, then use some method for the bonus, for example New Bonus [vJASS][LUA] and use this for tracking damage.

So: When you learn the ability, give the unit the bonus you want with the bonus system and setup the "Passive with cooldown", without the Cargo Hold (Meat Wagon), which will result in the ability not going on cooldown instantly.
When dealing damage to a target that you want to steal gold from (track that with Damage Engine, check that the cooldown is less than 0.01 seconds), remove some gold from damage target and give it to damage source, remove the bonus damage, give the Cargo Hold-ability to the unit (will result in the ability going on cooldown), start a timer with a short timer (0.1 seconds or so) to remove the Cargo Hold and start a the timer again for the remaining of the cooldown. When it finishes, give the bonus damage again and it's ready to go again!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
I'd use this method to handle the cooldown Passive ability with cooldown - Best method!, then use some method for the bonus, for example New Bonus [vJASS][LUA] and use this for tracking damage.

So: When you learn the ability, give the unit the bonus you want with the bonus system and setup the "Passive with cooldown", without the Cargo Hold (Meat Wagon), which will result in the ability not going on cooldown instantly.
When dealing damage to a target that you want to steal gold from (track that with Damage Engine, check that the cooldown is less than 0.01 seconds), remove some gold from damage target and give it to damage source, remove the bonus damage, give the Cargo Hold-ability to the unit (will result in the ability going on cooldown), start a timer with a short timer (0.1 seconds or so) to remove the Cargo Hold and start a the timer again for the remaining of the cooldown. When it finishes, give the bonus damage again and it's ready to go again!
There's no need for most of those steps with the Cooldown functions we now have available:
  • Unit - For Unit (Triggering unit), start cooldown of ability Exhume Corpses " over "5.00 seconds.
With this you can simply use Exhume Corpses as the Hero ability.

Then you can use the Get Remaining Cooldown function to check if it's available or not whenever you deal damage:
  • Events
    • Game - DamageModifierEvent becomes Equal to 1.00
  • Conditions
    • (Level of Jinada for DamageEventSource) Greater than 0
    • (Ability Cooldown Remaining of DamageEventSource for ability Jinada..) Less than or equal to 0.00
  • Actions
    • Unit - For Unit DamageEventSource, start cooldown of ability Jinada " over "5.00 seconds.
    • // steal gold from DamageEventTarget
 
Last edited:
Status
Not open for further replies.
Top