- Joined
- Oct 23, 2011
- Messages
- 182
Very strange handle ID bug
My trigger's handleId is changed when it's fired and I retrieve the id
It is very strange.
What's even more strange is that all triggers created seem to have same handle id when I use GetHandleId(GetTriggeringTrigger())
Seems to be related with the post below
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/really-weird-trigger-handle-bug-187468/
My trigger's handleId is changed when it's fired and I retrieve the id
It is very strange.
What's even more strange is that all triggers created seem to have same handle id when I use GetHandleId(GetTriggeringTrigger())
Seems to be related with the post below
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/really-weird-trigger-handle-bug-187468/
JASS:
private method onEn takes nothing returns boolean
local thistype this = ...
set .trg = CreateTrigger()
set data[GetHandleId(.trg)] = this
call BJDebugMsg(I2S(GetHandleId(.trg)))
call TriggerRegisterUnitInRange(.trg, .fx.dummy, 200, null)
call TriggerAddCondition(.trg, Condition(function thistype.onEnter))
return false
endmethod
private static method onEnter takes nothing returns boolean
local thistype this = data[GetHandleId(GetTriggeringTrigger())]
call BJDebugMsg(I2S(GetHandleId(GetTriggeringTrigger()))) // ITS DIFFERENT
return false
endmethod
Last edited: