AdamGriffith
You can change this now in User CP.
- Reaction score
- 69
As the title says.
Thanks,
Adam
JASS:
function Trig_Dialog_Button_Actions takes nothing returns nothing
local integer i = 0
local force f = CreateForce()
if GetClickedButton() == udg_Dialog_Button[0] then
//Do nothing.
elseif GetClickedButton() == udg_Dialog_Button[1] then
set i = 0
loop
exitwhen i == 6
call ForceClear(f)
call ForceAddPlayer(f, Player(i*2))
call ForceAddPlayer(f, Player(i*2+1))
call SetForceAllianceStateBJ(f, f, bj_ALLIANCE_ALLIED_VISION)
set i = i + 1
endloop
elseif GetClickedButton() == udg_Dialog_Button[2] then
set i = 0
loop
exitwhen i == 4
call ForceClear(f)
call ForceAddPlayer(f, Player(i*2))
call ForceAddPlayer(f, Player(i*2+1))
call ForceAddPlayer(f, Player(i*2+2))
call SetForceAllianceStateBJ(f, f, bj_ALLIANCE_ALLIED_VISION)
set i = i + 1
endloop
elseif GetClickedButton() == udg_Dialog_Button[3] then
set i = 0
loop
exitwhen i == 3
call ForceClear(f)
call ForceAddPlayer(f, Player(i*2))
call ForceAddPlayer(f, Player(i*2+1))
call ForceAddPlayer(f, Player(i*2+2))
call ForceAddPlayer(f, Player(i*2+3))
call SetForceAllianceStateBJ(f, f, bj_ALLIANCE_ALLIED_VISION)
set i = i + 1
endloop
elseif GetClickedButton() == udg_Dialog_Button[4] then
set i = 0
loop
exitwhen i == 2
call ForceClear(f)
call ForceAddPlayer(f, Player(i*2))
call ForceAddPlayer(f, Player(i*2+1))
call ForceAddPlayer(f, Player(i*2+2))
call ForceAddPlayer(f, Player(i*2+3))
call ForceAddPlayer(f, Player(i*2+4))
call ForceAddPlayer(f, Player(i*2+5))
call SetForceAllianceStateBJ(f, f, bj_ALLIANCE_ALLIED_VISION)
set i = i + 1
endloop
endif
call DestroyForce(f)
set f = null
endfunction
//===========================================================================
function InitTrig_Dialog_Button takes nothing returns nothing
set gg_trg_Dialog_Button = CreateTrigger( )
call TriggerRegisterDialogEvent(gg_trg_Dialog_Button, udg_Dialog)
call TriggerAddAction( gg_trg_Dialog_Button, function Trig_Dialog_Button_Actions )
endfunction
Thanks,
Adam