[JASS] Can I register an ability gain event?

Status
Not open for further replies.
Level 18
Joined
Apr 13, 2008
Messages
1,629
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.
 
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.
 
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).
 
Status
Not open for further replies.
Back
Top