• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Passively triggered Ability

Status
Not open for further replies.
Level 7
Joined
May 30, 2018
Messages
290
Is there a relatively simple way for an amateur to make an ability, which triggers automatically, when a certain hp treshold is reached. Basically after 25% hp lost... happens, after 50 % are lost.... happens

I have no idea of coding or triggers so don't be to harsh to me :p
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
You can use this to make a passive ability with a cooldown, but it will still require more triggers to detect when the units reach a certain life threshold and the ability isn't on cooldown. Essentially you put all the units you want to monitor in a group and then with a trigger that runs off a 0.25s repeating timer you look through the group and see each unit is below the threshold. If so you remove cargo hold from the unit and the passive effect goes off, which you can do whatever with.

The way you code it from there on out depends on what the actual effect you want to achieve is. Some effects will necessitate a damage detection system, but not every one does.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
What, the only passive with a cooldown isn't enough functionality out of one ability?

Given nearly two years I think you could have tested the spellbook thing yourself, lol. My best guess is that giving it a valid but unresearched techtree requirement the ability will appear greyed out w/ yellow text, but with an invalid rawcode it crashes the internal code that displays the requirements so nothing appears as if you had disabled the ability.
 
Last edited:
Level 48
Joined
Jul 29, 2008
Messages
9,847
What?

I'm not sure I follow; I wasn't referring to Spellbooks, just this "passive with cooldown" trick using Exhume Corpse. Like, normally I discover something new (e.g. "hey, Cloud does stack!"), I relatively quickly get a grasp on what it can be used for (e.g. "...so that means I can modify AS & MS & miss chance & 'attack' disabling at will!...").

However with this, I don't really know what one would do with it.
 
Status
Not open for further replies.
Top