- Joined
- Jul 3, 2005
- Messages
- 100
JASS:
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
boolean array udg_Player_A
boolean array udg_Player_D
boolean udg_Game_On = false
multiboard udg_Fatboard = null
unit array udg_Player_Ogre
dialog udg_Voting = null
button array udg_Vote_Button
integer udg_Max_Fatness = 0
integer array udg_Votes
// Generated
rect gg_rct_Fat_Ogre = null
rect gg_rct_Fat_Ogre_2 = null
rect gg_rct_Fat_Ogre_3 = null
rect gg_rct_Fat_Ogre_4 = null
rect gg_rct_Fat_Ogre_5 = null
rect gg_rct_Fat_Ogre_6 = null
rect gg_rct_Climatiic = null
camerasetup gg_cam_View = null
camerasetup gg_cam_Cinematic_1 = null
sound gg_snd_PeasantPissed5 = null
sound gg_snd_OgrePissed5 = null
trigger gg_trg_Fatboard_1 = null
trigger gg_trg_Fat_A = null
trigger gg_trg_Fat_D = null
trigger gg_trg_Movie = null
trigger gg_trg_Modes_Voting = null
trigger gg_trg_Modes_Votes = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set i = 0
loop
exitwhen (i > 6)
set udg_Player_A[i] = false
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 6)
set udg_Player_D[i] = false
set i = i + 1
endloop
set udg_Game_On = false
set udg_Voting = DialogCreate()
set udg_Max_Fatness = 0
set i = 0
loop
exitwhen (i > 4)
set udg_Votes[i] = 0
set i = i + 1
endloop
endfunction
function Trig_Modes_Votes_Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Vote_Button[1] ) ) then
return false
endif
return true
endfunction
function Trig_Modes_Votes_Func002C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Vote_Button[2] ) ) then
return false
endif
return true
endfunction
function Trig_Modes_Votes_Func003C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Vote_Button[3] ) ) then
return false
endif
return true
endfunction
function Trig_Modes_Votes_Actions takes nothing returns nothing
if ( Trig_Modes_Votes_Func001C() ) then
set udg_Votes[1] = ( udg_Votes[1] + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 4,00, ( "Votes for FFA : " + I2S(udg_Votes[1]) ) )
else
call DoNothing( )
endif
if ( Trig_Modes_Votes_Func002C() ) then
set udg_Votes[2] = ( udg_Votes[2] + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 4,00, ( "Votes for 2vs2vs2 : " + I2S(udg_Votes[2]) ) )
else
call DoNothing( )
endif
if ( Trig_Modes_Votes_Func003C() ) then
set udg_Votes[3] = ( udg_Votes[3] + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 4,00, ( "Votes for 2vs2vs2 : " + I2S(udg_Votes[3]) ) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Modes_Votes takes nothing returns nothing
set gg_trg_Modes_Votes = CreateTrigger( )
call DisableTrigger( gg_trg_Modes_Votes )
call TriggerRegisterDialogEventBJ( gg_trg_Modes_Votes, udg_Voting )
call TriggerAddAction( gg_trg_Modes_Votes, function Trig_Modes_Votes_Actions )
endfunction
That's a script i made ( in GUI , but i got the italian version of WE , and most of you can't read it , so the only possible lenguage is JASS ) that gives me an error .
What the crap is wrong with it ?! I wasnt be able to figure it out .
Last edited by a moderator: