W
wFeral
Guest
two triggers in a class
t1 and t2, i convert t1 to custom script, source of t1 followed:
function Trig_t1_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_t1 takes nothing returns nothing
set gg_trg_t1 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_t1, 5.00 )
call TriggerAddAction( gg_trg_t1, function Trig_t1_Actions )
endfunction
it seems that Trig_t1_Actions is a function which can be invoked,so i want to invoke this function in trigger t2, t2 is still GUI form,click "New Action-Custom Script",and write down this:
call Trig_t1_Actions()
but is generated an error,and i saw the whole source file,it contains no t1's content,so invoke function in t1 generating an error.
who can tell me how to invoke a self-definition function in GUI trigger?
t1 and t2, i convert t1 to custom script, source of t1 followed:
function Trig_t1_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_t1 takes nothing returns nothing
set gg_trg_t1 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_t1, 5.00 )
call TriggerAddAction( gg_trg_t1, function Trig_t1_Actions )
endfunction
it seems that Trig_t1_Actions is a function which can be invoked,so i want to invoke this function in trigger t2, t2 is still GUI form,click "New Action-Custom Script",and write down this:
call Trig_t1_Actions()
but is generated an error,and i saw the whole source file,it contains no t1's content,so invoke function in t1 generating an error.
who can tell me how to invoke a self-definition function in GUI trigger?