• 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.

[JASS] Can I register an ability gain event?

Status
Not open for further replies.
Level 17
Joined
Apr 13, 2008
Messages
1,608
Hi.
I want to register ability gain events. No, not hero skill gain events.
The main reason for this is that I want to do things with units when they come under the effects of certain auras.

I know I could pick units around the unit with aura and add them buffs/abilities but that sounds insane an ineffective.
Please help me out.
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
No, not just heroes but regular units too.

PurplePoot, I don't know how do I use globals as the unit parameter in

JASS:
TriggerRegisterUnitInRange

Sorry for being stupid, I'm a novice JASSer.

Actually, I don't think it would fit my needs perfectly. I badly need something like TriggerRegisterAnyUnitEventAbilityGain, or something. Or a TriggerRegisterAnyUnitInRangeOfType.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
PurplePoot, I don't know how do I use globals as the unit parameter in
Dynamically create the event (and presumably the entire trigger with it). Then, attach it to the unit via some storage system, so that you can clean it up easily enough when the time comes.

TriggerRegisterAnyUnitEventAbilityGain
No can do, if you mean buffs. If you just mean abilities, you could just code your map that way (Replace UnitAddAbility).

TriggerRegisterAnyUnitInRangeOfType
Add a TriggerRegisterUnitInRange for every unit on the map (Or, if you just mean a single-subject event, TriggerRegisterUnitInRange with a boolexpr works).
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
I rather picking all units with buff
but... your choice

There is no trigger like that btw
 
Status
Not open for further replies.
Top