• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Event Filter

Status
Not open for further replies.
Level 20
Joined
Jul 6, 2009
Messages
1,885
JASS:
native TriggerRegisterPlayerUnitEvent takes trigger whichTrigger, player whichPlayer, playerunitevent whichPlayerUnitEvent, boolexpr filter returns event
Is it possible to retrieve casted spell in this event's filter?
I wanted to use it's filter for both conditions and actions but since for getting triggering unit from event i need to use filter unit (GetFilterUnit() returns triggering unit in event) is it possible to get spell? I couldn't find anything like GetFilterAbility()
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
I highly recommend to don't use these filter at all, it's obvious that Blizzard didn't finished them, only few response events work in them and they don't act like inside conditions.
But there is a nice trick with the "enter region event" filter, which AutoIndex is using and probably all other newer unit indexers.
 
Yes, the Enter-Region filter does everything you need it for in most cases. However, for one-time events or for data attachment, a set of Conditions are needed in order to retrieve GetTriggeringTrigger() or GetTriggeringRegion().

Conditions are required for all spells. If your aim is to reduce handle count, you may be interested in Jesus4Lyf's GTrigger or SpellEffectEvent.
 
Status
Not open for further replies.
Top