Minor event filter bug

Frozenhelfir

set Gwypaas = Guhveepaws
Reaction score
56
Was coding this in a performance bottle neck. It seems that the trigger and filter unit are both the killing unit when they should be the dying unit. Just a small point of interest I guess. I will be using a condition I guess, but if anyone knows how to fix this I wouldn't mind picking up the extra nano second :D.



JASS:
private function Filt takes nothing returns boolean
    call BJDebugMsg(GetUnitName(GetFilterUnit())) //returns killing unit
    call BJDebugMsg(GetUnitName(GetTriggerUnit())) //returns killing unit
    call BJDebugMsg(GetUnitName(GetEventTargetUnit())) //returns a null unit
    call BJDebugMsg(GetUnitName(GetDyingUnit())) //returns a null unit
    return GetUnitPointValue(GetFilterUnit()) <= MAX_STAT_PER_CREEP //and GetKillingUnit() != null
endfunction
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
You can only use GetFilterUnit() (GetTriggerUnit()) in event filter.
The rest will not work properly (even GetTriggeringTrigger()).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top