- Joined
- Apr 5, 2020
- Messages
- 36
I have 3 triggers that use 3 TriggerRegisterVariableEvent.
1
2
3
Problem: When I start writing "1" in the chat, this should appear in the chat:
====================
test1 acivated
test2 acivated
test3 acivated
test4 acivated
But it doesn't happen. As I understand it, TriggerRegisterVariableEvent of Event_Two stops the next triggers from Event_One from activating. How can this be fixed?
- In the first one, I set the Event_One variable, which should activate the TriggerRegisterVariableEvent in the second and third trigger.
- In the second trigger, when the TriggerRegisterVariableEvent from Event_One is activated, Event_Two is set to 1, which fires the TriggerRegisterVariableEvent for the test3 function.
1
JASS:
globals
real Event_One = 0.00
real Event_Two = 0.00
endglobals
function Trig_Event_test1_Actions takes nothing returns nothing
call BJDebugMsg("====================")
call BJDebugMsg("test1 acivated")
set Event_One = 1.00
set Event_One = 0.00
endfunction
//===========================================================================
function InitTrig_Event_test1 takes nothing returns nothing
set gg_trg_Event_test1 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Event_test1, Player(0), "1", true )
call TriggerAddAction( gg_trg_Event_test1, function Trig_Event_test1_Actions )
endfunction
2
JASS:
function Trig_Event_test2_Actions takes nothing returns nothing
call BJDebugMsg("test2 acivated")
set Event_Two = 1.00
set Event_Two = 0.00
endfunction
function test3 takes nothing returns nothing
call BJDebugMsg("test3 acivated")
endfunction
//===========================================================================
function InitTrig_Event_test2 takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterVariableEvent( trig, "Event_One", EQUAL, 1.00 )
call TriggerAddAction( trig, function Trig_Event_test2_Actions )
set trig = CreateTrigger()
call TriggerRegisterVariableEvent( trig, "Event_Two", EQUAL, 1.00 )
call TriggerAddAction( trig, function test3 )
set trig = null
endfunction
3
JASS:
function Trig_Event_test4_Actions takes nothing returns nothing
call BJDebugMsg("test4 acivated")
endfunction
//===========================================================================
function InitTrig_Event_test4 takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterVariableEvent( trig, "Event_One", EQUAL, 1.00 )
call TriggerAddAction( trig, function Trig_Event_test4_Actions )
set trig = null
endfunction
Problem: When I start writing "1" in the chat, this should appear in the chat:
====================
test1 acivated
test2 acivated
test3 acivated
test4 acivated
But it doesn't happen. As I understand it, TriggerRegisterVariableEvent of Event_Two stops the next triggers from Event_One from activating. How can this be fixed?
Last edited: