Hey. I need to know how to do this...
If Blue pauses the game, the game un-pauses itself.
If Red pauses the game through the F10 menu, the game un-pauses itself.
However, if Red types "-pause" the game will remain paused until Red types "-unpause".
Also, I need it so they can't UN-pause the game either. If they try, it pauses itself again,
unless Red types "-unpause"
Any way to do this? Ways in GUI or JASS are fine, as I can read both.
Thanks.
Only Red being able to pause the game through a command.
Moderator: Cheaters
-
- Senior Member
- Posts: 112
- Joined: November 8th, 2008, 4:38 am
- Title: God
-
- Tyrannical Drama Queen
- Posts: 4430
- Joined: November 19th, 2007, 5:05 am
- Been thanked: 2 times
Re: Only Red being able to pause the game through a command.
There's no, "real", way to pause it, at least, I don't think so.
You'd have to pause all units, and probably timers and triggers that are on timers, as well. I'm not too sure how that would work, but it should be possible, and since I don't have Warcraft 3 installed on this computer at the moment, I can't really show ANY triggers.
You'd have to pause all units, and probably timers and triggers that are on timers, as well. I'm not too sure how that would work, but it should be possible, and since I don't have Warcraft 3 installed on this computer at the moment, I can't really show ANY triggers.
-
- Forum Staff
- Posts: 2618
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: Only Red being able to pause the game through a command.
Bart, there's a pause function, that affects everything. There's a button for it in the menu.
Here, I made a chat command for it. Nobody but red can use the commands, and red can (un)pause it if someone actually goes into the menu and tries to change it. I'm not sure if I can disable the menu button. I don't think it's possible.
Put this under endglobals:
And put this under globals:
Here, I made a chat command for it. Nobody but red can use the commands, and red can (un)pause it if someone actually goes into the menu and tries to change it. I'm not sure if I can disable the menu button. I don't think it's possible.
Put this under endglobals:
Code: Select all
function Trig_Pause_Actions takes nothing returns nothing
call PauseGameOn()
endfunction
function InitTrig_Pause takes nothing returns nothing
set gg_trg_Pause=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_Pause,Player(0),"-pause",true)
call TriggerAddAction(gg_trg_Pause,function Trig_Pause_Actions)
endfunction
function Trig_Unpause_Actions takes nothing returns nothing
call PauseGameOff()
endfunction
function InitTrig_Unpause takes nothing returns nothing
set gg_trg_Unpause=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_Unpause,Player(0),"-unpause",true)
call TriggerAddAction(gg_trg_Unpause,function Trig_Unpause_Actions)
endfunction
Code: Select all
trigger gg_trg_Pause=null
trigger gg_trg_Unpause=null
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle