[Jass] Speed of gameplay
Posted: December 26th, 2012, 4:29 pm
I want to change to speed of gameplay.
I tried making it but failed.
Help needed
I tried making it but failed.
Help needed
Code: Select all
globals
trigger GameSpeed=null
trigger GameSpeed1=null
trigger GameSpeed2=null
endglobals
function aSetGameSpeed takes nothing returns nothing
call SetGameSpeed(ConvertGameSpeed(4))
endfunction
function bSetGameSpeed takes nothing returns nothing
call SetGameSpeed(ConvertGameSpeed(3))
endfunction
function cSetGameSpeed takes nothing returns nothing
call SetGameSpeed(ConvertGameSpeed(2))
endfunction
function main takes nothing returns nothing
set GameSpeed=CreateTrigger()
call TriggerRegisterPlayerChatEvent(GameSpeed,Player(0),"-fastest",false)
call TriggerAddAction(GameSpeed,function aSetGameSpeed)
set GameSpeed1=CreateTrigger()
call TriggerRegisterPlayerChatEvent(GameSpeed,Player(0),"-fast",false)
call TriggerAddAction(GameSpeed1,function bSetGameSpeed)
set GameSpeed2=CreateTrigger()
call TriggerRegisterPlayerChatEvent(GameSpeed,Player(0),"-normal",false)
call TriggerAddAction(GameSpeed2,function cSetGameSpeed)
endfunction