hello, i want ask something
i make trigger with event every 3 sec , i use handle counter to check if the trigger leaking or not..
but when the trigger already run 3 times ( at 10 sec) , the number increasing..
Handle counter jass,
in game , i take screen shot of handle counter,
it happen when action "wait 0.1 sec " start
i am already turn off all trigger , for checking whether another trigger causing it , but it is not , the causes come from this trigger itself
can anyone help me finding the leak ?
i make trigger with event every 3 sec , i use handle counter to check if the trigger leaking or not..
but when the trigger already run 3 times ( at 10 sec) , the number increasing..
-
error
-
Events
- Time - Every 3.00 seconds of game time
- Conditions
-
Actions
- Set MLoop[1] = 0
- Set MLoop[1] = (MLoop[1] + 1)
- Set Striker[18] = (Position of Hero[MLoop[1]])
- Set Unit_Groups = (Units within 750.00 of Striker[18] matching ((((Matching unit) is A Hero) Equal to True) and (((Player number of (Owner of (Matching unit))) Greater than or equal to 1) and (((Player number of (Owner of (Matching unit))) Less than or equal to 9) and (((Match
- Set NumUnit = (Number of units in Unit_Groups)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumUnit Greater than 0
-
Then - Actions
-
Unit Group - Pick every unit in Unit_Groups and do (Actions)
-
Loop - Actions
- Unit - Cause Hero[MLoop[1]] to damage (Picked unit), dealing 5.00 damage of attack type Spells and damage type Normal
-
Loop - Actions
-
Unit Group - Pick every unit in Unit_Groups and do (Actions)
- Else - Actions
-
If - Conditions
- Custom script: call DestroyGroup(udg_Unit_Groups)
- Custom script: set udg_Unit_Groups = null
- Custom script: call RemoveLocation(udg_Striker[18])
- Game - Display to (All players) the text: post 1
- Wait 0.10 seconds
- Game - Display to (All players) the text: post 1.25
- Set MLoop[1] = (MLoop[1] + 1)
- Set Striker[18] = (Position of Hero[MLoop[1]])
- Game - Display to (All players) the text: post 1.3
- Set Unit_Groups = (Units within 750.00 of Striker[18] matching ((((Matching unit) is A Hero) Equal to True) and (((Player number of (Owner of (Matching unit))) Greater than or equal to 1) and (((Player number of (Owner of (Matching unit))) Less than or equal to 9) and (((Match
- Game - Display to (All players) the text: post 1.35
- Set NumUnit = (Number of units in Unit_Groups)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumUnit Greater than 0
-
Then - Actions
-
Unit Group - Pick every unit in Unit_Groups and do (Actions)
-
Loop - Actions
- Unit - Cause Hero[MLoop[1]] to damage (Picked unit), dealing 5.00 damage of attack type Spells and damage type Normal
-
Loop - Actions
-
Unit Group - Pick every unit in Unit_Groups and do (Actions)
- Else - Actions
-
If - Conditions
- Game - Display to (All players) the text: post 1.5
- Custom script: call DestroyGroup(udg_Unit_Groups)
- Custom script: set udg_Unit_Groups = null
- Custom script: call RemoveLocation(udg_Striker[18])
- Game - Display to (All players) the text: post 2
-
Events
JASS:
function HandleCount takes nothing returns nothing
local location L = Location(0,0)
call BJDebugMsg(I2S(GetHandleId(L)-0x100000))
call RemoveLocation(L)
set L = null
endfunction
//===========================================================================
function InitTrig_HandleCount takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t,0.09,true)
call TriggerAddAction(t,function HandleCount)
endfunction
in game , i take screen shot of handle counter,
it happen when action "wait 0.1 sec " start
i am already turn off all trigger , for checking whether another trigger causing it , but it is not , the causes come from this trigger itself
can anyone help me finding the leak ?
Attachments
Last edited by a moderator: