Long version
So far i never changed the functions that register the triggers, but while the script of my map becomes larger and larger and clarity becomes an issue, i thought i could start moving triggers to libraries and scopes and use local variables for the triggers. And this is what i changed in the below trigger, i set the variable to local, and i moved it to another place (the upmost 'code-space'). It's not even within a library or a scope yet, but it doesn't fire... I guess there's one more thing i didn't understand. But what?
Short version
Why doesn't the event fire?
Thanks for any answers!
whisp
So far i never changed the functions that register the triggers, but while the script of my map becomes larger and larger and clarity becomes an issue, i thought i could start moving triggers to libraries and scopes and use local variables for the triggers. And this is what i changed in the below trigger, i set the variable to local, and i moved it to another place (the upmost 'code-space'). It's not even within a library or a scope yet, but it doesn't fire... I guess there's one more thing i didn't understand. But what?
Short version
Why doesn't the event fire?
JASS:
function aActions2 takes nothing returns nothing
call BJDebugMsg("action2")
//call DialogDisplayBJ( true, glb_dMainmenu, GetTriggerPlayer() )
endfunction
function InitTrig_a takes nothing returns nothing
local trigger trg = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( trg, Player(0), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(1), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(2), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(3), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(4), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(5), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(6), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(7), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(8), "-t", true )
call TriggerRegisterPlayerChatEvent( trg, Player(9), "-t", true )
call TriggerAddAction( trg, function aActions2 )
//call DestroyTrigger(trg)
//set trg = null
endfunction
Thanks for any answers!
whisp