Page 1 of 1

[Jass] Speed of gameplay

Posted: December 26th, 2012, 4:29 pm
by Apple
I want to change to speed of gameplay.
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

Re: Speed of gameplay

Posted: December 28th, 2012, 8:07 am
by Fukki

Code: Select all

function aSetGameSpeed takes nothing returns nothing
call SetMapFlag(MAP_LOCK_SPEED,false)
call SetGameSpeed(ConvertGameSpeed(4))
call SetMapFlag(MAP_LOCK_SPEED,true)
endfunction
function bSetGameSpeed takes nothing returns nothing
call SetMapFlag(MAP_LOCK_SPEED,false)
call SetGameSpeed(ConvertGameSpeed(3))
call SetMapFlag(MAP_LOCK_SPEED,true)
endfunction
function cSetGameSpeed takes nothing returns nothing
call SetMapFlag(MAP_LOCK_SPEED,false)
call SetGameSpeed(ConvertGameSpeed(2))
call SetMapFlag(MAP_LOCK_SPEED,true)
endfunction

Re: Speed of gameplay

Posted: December 30th, 2012, 4:32 pm
by Apple
Fukki wrote:

Code: Select all

function aSetGameSpeed takes nothing returns nothing
call SetMapFlag(MAP_LOCK_SPEED,false)
call SetGameSpeed(ConvertGameSpeed(4))
call SetMapFlag(MAP_LOCK_SPEED,true)
endfunction
function bSetGameSpeed takes nothing returns nothing
call SetMapFlag(MAP_LOCK_SPEED,false)
call SetGameSpeed(ConvertGameSpeed(3))
call SetMapFlag(MAP_LOCK_SPEED,true)
endfunction
function cSetGameSpeed takes nothing returns nothing
call SetMapFlag(MAP_LOCK_SPEED,false)
call SetGameSpeed(ConvertGameSpeed(2))
call SetMapFlag(MAP_LOCK_SPEED,true)
endfunction

great thanks.
Hmm the speed of the game didn't go any faster, why is that so?

Re: Speed of gameplay

Posted: December 31st, 2012, 9:18 am
by Fukki
normally in "bnet" and "local area" game has set to faster

Re: Speed of gameplay

Posted: December 31st, 2012, 9:52 am
by Apple
but when i type -normal it didn't get any slower too

Re: Speed of gameplay

Posted: January 7th, 2013, 11:39 am
by Nuuby
If you're hosting the game, use TFTL's /speed command. Basically CE's speedhack that affects all players in your game.

p.s: you can exploit timers on some poorly coded maps with this. PolledWait uses timers independent of game time, TriggerSleep uses timers dependent of game time.