HELP: in GUI I can not invoke functions in costom script ?

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?
 

saw792

Is known to say things. That is all.
Reaction score
280
You can only call ('invoke') a function that is above the calling function in the map's script. The only way to guarantee that the function will be above the calling function is by putting it in the map's custom script header. It may also be giving you errors because function Trig_t1_Actions does nothing. Try adding some actions to it.
 
W

wFeral

Guest
re upstair

can you tell me how to "putting it in the map's custom script header" ?:p
 
W

wFeral

Guest
Doubleclick on it makes fold or unfold ...
singleclick does nothing ...
can you tell me the details ?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top