- Joined
- Jan 6, 2008
- Messages
- 2,627
Hi there, these are my jass trigs....
and some gui
The problem is "Hit", if i have it "off", the tracking works, if i have the Hit trigger on, nothing works, help
JASS:
function Trig_Ini_Actions takes nothing returns nothing
globals
trackable array Track[1]
endglobals
local trackable array Track
set Track[1] = CreateTrackable("empinv.mdx", 14520, 14723, 0)
set Track[2] = CreateTrackable("empinv.mdx", 14590, 14723, 0)
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 999
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerRegisterTrackableTrackEvent( gg_trg_Track, Track[GetForLoopIndexA()] )
call TriggerRegisterTrackableHitEvent( gg_trg_Hit, Track[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Ini takes nothing returns nothing
set gg_trg_Ini = CreateTrigger( )
call TriggerAddAction( gg_trg_Ini, function Trig_Ini_Actions )
endfunction
JASS:
function Trig_Track_Func001Func001C takes nothing returns boolean
if ( not ( GetTriggeringTrackable() == Track[GetForLoopIndexA()] ) ) then
return false
endif
return true
endfunction
function Trig_Track_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 999
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Track_Func001Func001C() ) then
set udg_TrackBoolean[GetForLoopIndexA()] = true
call ConditionalTriggerExecute( gg_trg_TrackMultiboard )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Track takes nothing returns nothing
set gg_trg_Track = CreateTrigger( )
call TriggerAddAction( gg_trg_Track, function Trig_Track_Actions )
endfunction
JASS:
function Trig_Hit_Func001Func001C takes nothing returns boolean
if ( not ( GetTriggeringTrackable() == Track[GetForLoopIndexA()] ) ) then
return false
endif
return true
endfunction
function Trig_Hit_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 999
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Hit_Func001Func001C() ) then
set udg_TrackBoolean2[GetForLoopIndexA()] = true
call ConditionalTriggerExecute( gg_trg_Hit2 )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Hit takes nothing returns nothing
set gg_trg_Track = CreateTrigger( )
call TriggerAddAction( gg_trg_Hit, function Trig_Hit_Actions )
endfunction
and some gui
-
Hit2
-
Events
-
Conditions
-
lol Equal to False
-
-
Actions
-
For each (Integer A) from 1 to 150, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TrackBoolean2[(Integer A)] Equal to True
-
-
Then - Actions
-
Game - Display to (All players) the text: test
-
-
Else - Actions
-
-
-
-
For each (Integer B) from 1 to 2, do (Actions)
-
Loop - Actions
-
Set TrackBoolean2[(Integer B)] = False
-
-
-
-
-
TrackMultiboard
-
Events
-
Conditions
-
lol Equal to False
-
-
Actions
-
For each (Integer B) from 1 to 2, do (Actions)
-
Loop - Actions
-
Multiboard - Hide ItemMultiboard[(Integer B)]
-
-
-
For each (Integer A) from 1 to 2, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TrackBoolean[(Integer A)] Equal to True
-
-
Then - Actions
-
Multiboard - Show ItemMultiboard[(Integer A)]
-
Multiboard - Maximize ItemMultiboard[(Integer A)]
-
-
Else - Actions
-
-
-
-
For each (Integer B) from 1 to 2, do (Actions)
-
Loop - Actions
-
Set TrackBoolean[(Integer B)] = False
-
-
-
-