/*
wc3 version : 1.26.0.6401
text displayed :
variable event x
variable event X
variable event x
variable event X
f1
F1
*/
library Test initializer init
globals
real x = 0
real X = 0
endglobals
function f1 takes nothing returns nothing
call BJDebugMsg("f1")
endfunction
function F1 takes nothing returns nothing
call BJDebugMsg("F1")
endfunction
function F takes nothing returns nothing
call BJDebugMsg("variable event local")
endfunction
private function VE_x takes nothing returns nothing
call BJDebugMsg("variable event x")
endfunction
private function VE_X takes nothing returns nothing
call BJDebugMsg("variable event X")
endfunction
private function init takes nothing returns nothing
local trigger trig
local real r = 0
call TriggerSleepAction(0) // for message available in the box
call TriggerRegisterVariableEvent(trig,"r",EQUAL,1)
call TriggerAddAction(trig,function F)
set r = 1
set trig = CreateTrigger()
call TriggerRegisterVariableEvent(trig,"x",EQUAL,1)
call TriggerAddAction(trig,function VE_x)
set trig = CreateTrigger()
call TriggerRegisterVariableEvent(trig,"X",EQUAL,1)
call TriggerAddAction(trig,function VE_X)
set x = 1
set X = 1
call ExecuteFunc("f1")
call ExecuteFunc("F1")
endfunction
endlibrary