Passive ability with a cooldown (attack-based)

Level 18
Joined
Dec 17, 2009
Messages
1,114
Tutorial
Passive Abilities With Cooldown

Tutorial
Introduction

I seen many people posted some threads about it and most people who knew how to make a passive ability with a cooldown wouldn't answer it, so here are the tricks to do this yourself (example:Geminate Attack from DotA!(Well IceFrog's spell is triggered too, but making the passive cooldown is the same like the one provided in this tutorial))

Well the trick is actually simple, NO TRIGGERING SKILLS NEEDED!
Yes i mean it, even if you have no actual knowledge about triggering, and you only know HOW to use Object Editor etc etc, you can make it.
Start Here

The Actions


So lets get started

What will you be needing:
-World Edit
-Knowledge about the Object Editor
-A Brain

First of all , create an ability which you want it to be cast passively , doesn't matter if the ability is an active ability, i will use chain lightning as my passive ability,and i will name the ability "Twin Lightning", doesn't matter.

Here's the image:
attachment.php


Now create an ability based off the Orb of Lightning.

Here's the image:

attachment.php


Now here's the deal

Set the "Data - Effect Ability" in the ability you've just made to Twin Lightning or what name/ability you want, you can set the chance too, it's all yours

attachment.php


I guess that covers it all, let me show you a gameplay screenshot if you don't believe me

attachment.php


attachment.php


attachment.php
Notes
Notes:

The icon will appear to be darker than the actual icon. To fix this, you should import a custom version of the icon and make the regular icon have a path prefix of "DISPAS" and make the actual DISPAS have a path prefix of "PAS". For example, if you have a custom version of an icon named "MyPassiveAbility.blp", then you would make the normal PASBTN have a path of:
ReplaceableTextures\CommandButtonsDisabled\DISPASMyPassiveAbility.blp

And make the other disabled version have a path of:
ReplaceableTextures\CommandButtons\PASMyPassiveAbility.blp

Then in the object editor, assign it to the icon with the path:
ReplaceableTextures\CommandButtons\PASMyPassiveAbility.blp

Note that this may appear as green when the game is paused. (I'm not positive about this, but I assume that would happen) However, the problem where it is darkened will be fixed.

Also note that this technique as a whole is subject to whatever bugs/quirks the orb abilities already have.
Test Map
 

Attachments

  • example.png
    example.png
    80.8 KB · Views: 7,655
  • example2.png
    example2.png
    22 KB · Views: 7,482
  • example3.png
    example3.png
    51.3 KB · Views: 7,747
  • twin lightning in cooldown.png
    twin lightning in cooldown.png
    947.3 KB · Views: 9,331
  • twin lightning in effect.png
    twin lightning in effect.png
    580.8 KB · Views: 8,287
  • Twin Lightning lol.png
    Twin Lightning lol.png
    629.5 KB · Views: 8,582
  • Passive Testmap.w3x
    47.2 KB · Views: 1,652
Last edited:
Level 3
Joined
Apr 5, 2010
Messages
31
The reason that icon gets darker when you learn it is that it automatically becomes a DISBTN type icon. So use a brighter DISBTN can solve the problem, but then when you open the menu then everything goes dark except this icon XD, which is kinda annoying
 
Level 18
Joined
Dec 17, 2009
Messages
1,114
The title does not fit. I was hoping for a tutorial how to generally make passive abilities with cooldown.


You can set the ability to be a channel ability , and trigger what it would do, it will still have the cooldown, this is flexible if you don't know.

And Orb effects destroy this skill, missile modifiers don't seem to destroy this ability, (tested a poison arrow + this)

@fakedrake, you can change the BTN into brighter and leave the DISBTN dark, i think that's how i solved it? or vice versa?i can't seem to remember
 
Level 25
Joined
Aug 18, 2009
Messages
4,084
You can set the ability to be a channel ability , and trigger what it would do, it will still have the cooldown, this is flexible if you don't know.

And it will still go only onAttack. But passives can also fire on other ocassions such as a nearby unit dies, the unit gets healed, receives damage/drops below life, casts another spell/uses an item, kills a unit, idles, ...

The problem is that you cannot trigger the ability instantly via trigger, not immediately perform an attack against some dummy unit or get to cooldown otherwise. At least, I do not know of such a way and was hoping to get some clue as I was reading the thread title.

Btw, orb abilities have another bug. If a unit attacks automatically out of a nearby enemy aggravating, not because you ordered it, it won't have an order and orb effects won't trigger then.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Is there a need for passive abilities to cooldown?

You obviously does not play many types of custom map just yet (especially AoS-type which include this special features and add unique gameplay to the map)

On Thread
When I first enter this thread, I was hoping that when my unit walks about 500 range away, it will trigger this ability itself and has its cooldown (judging by the thread topic name...)

But, it's truly misled me as this only occurs when it's onAttack by referring to WaterKnight

Can you please change the title as to avoid further confusion for newcomers

Something like: Making a passive ability with a cooldown (attack-based) ?
 
Sorry for the lateness to review. I have checked this out and it seems like a workable technique. I changed the title to "Passive ability with a cooldown (attack-based)", hopefully that is okay. Usually you don't have to have the "Making a..." part since it is implied. (since the thread is a tutorial)

However, you should make a note at the end, preferably looking something like this:

Notes:


The icon will appear to be darker than the actual icon. To fix this, you should import a custom version of the icon and make the regular icon have a path prefix of "DISPAS" and make the actual DISPAS have a path prefix of "PAS". For example, if you have a custom version of an icon named "MyPassiveAbility.blp", then you would make the normal PASBTN have a path of:
ReplaceableTextures\CommandButtonsDisabled\DISPASMyPassiveAbility.blp

And make the other disabled version have a path of:
ReplaceableTextures\CommandButtons\PASMyPassiveAbility.blp

Then in the object editor, assign it to the icon with the path:
ReplaceableTextures\CommandButtons\PASMyPassiveAbility.blp

Note that this may appear as green when the game is paused. (I'm not positive about this, but I assume that would happen) However, the problem where it is darkened will be fixed.

Also note that this technique as a whole is subject to whatever bugs/quirks the orb abilities already have.

You can actually just use that text directly if you want, and I'll approve.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
orbs doesnt have cooldowns coz it triggers on each chance
Data - Chance to Hit Heros (%): 100.00
Data - Chance to Hit Summons (%): 100.00
Data - Chance to Hit Units (%): 100.00

Or I just misunderstood you ?

Well, it is called as cooldown because it will trigger each time you ordered an attack.
Just like spell, when you order it to cast, it will fire but can't be re-fired when it is in cooldown, same as for the orb.

For first ordered attack, it will trigger it, but for the next (while on cooldown), it will trigger.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
So why do you said that the title is misleading, at first (yes it was) but then again, it was improved to (Attack-based), meaning that this cooldown will proc via Attack (ordered), it seems that it leads us to the right place.
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
coz chainlightning/firebolt/frost nova, etc...is an active ability...orb is passive but it
doesnt have cooldowns, like the "Data - Damage Bonus" and the 'chances'...

also I may add that you dont need to impost a 'PAS' (passive) icon for the 'Data - Effect Ability'
coz it will be automatically be passive once implemented...
 
Level 4
Joined
Jun 30, 2014
Messages
72
This fix does require triggering a little.

For all the people who are complaining that it doesn't fire when the unit starts a fight without an attack order, here's a solution.:ogre_hurrhurr:
A trigger like so:
  • Autotarget attack
    • Events
    • Conditions
    • Actions
      • Unit - Order *A unit variable of some kind, for the unit who has this ability* to Attack (Targeted unit)
When the unit is from a tavern (alter this for your Hero pick system), connect the attack trigger to something like this:
  • Set Autoattack
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to *insert your unit*
    • Actions
      • Set *the variable for your unit* = (Sold unit)
      • Trigger - Add to Autotarget attack (*the first trigger*) <gen> the event (Unit - *the variable for your unit, again* Acquires a target)
If multiple units have the ability, set the *variable for your unit* as an array, but beware that having 20 (or lots in general) units using this trigger system lags badly. Lag causes FRUSTRATION!:ogre_rage:
 
Last edited:
Level 6
Joined
Feb 6, 2015
Messages
269
Worked. Although, there are things in the object editor I didn't understand.
Would have hoped if this tutorial had more details about that.
 
Level 4
Joined
Mar 26, 2020
Messages
63
been looking for this last year and all i get is triggers, and finally after a year i saw this AND WITHOUT a trigger one bit~

thank you good sir! i wish i could upvote this three times lol
 
Top