apparently there's no such way to detect pause game event or even check if the game is paused or not, thus unable to prevent players from pausing the game.
a workaround would be periodic event which continously unpause the game, like this:
change the interval to value that suits you.
- Unpause Game
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- Game - Unpause the game
You can try the following method: Check if a certain unit is paused before using the unpause game action. I'm assuming units are paused when the game is paused.
or maybe you can prevent them to gain advantage. i think that would be easyer
altough i don't know how your map works:/
what is the advantage one team gains?
Players from team 1 pause game....while game is paused Team 2 cant build but cooldown in Tavern of Team 1 continies to reduce even if game is paused...
If you really want to forbid pause it's quite easy.
There is a hardcoded limit of 3 pauses, included the ones made by triggers if i remember correctly.
So just make a trigger which pause/unpause the game 3 times and players wouldn't be allowed to use the pause anymore.
You can try the "event" map initialization, or maybe time elapsed and you shouldn't have to use any wait for the different pause and unpause.
This will work only if it's a lan / battle.net game.
call PauseGame(true)
call PauseGame(false)
call PauseGame(true)
call PauseGame(false)
call PauseGame(true)
call PauseGame(false)
I didn't know what you did with Troll-Brain's suggestion to use up the pause,
I tried with this simple script run after Elapsed 1 second event on LAN game:
it did waste all 3 pauses without any real pause, just 3 message about used up pause.JASS:call PauseGame(true) call PauseGame(false) call PauseGame(true) call PauseGame(false) call PauseGame(true) call PauseGame(false)
I didn't know what bug come across you but I can confirm this method works flawlessly in my test.
if you want, you can use PandaMine's AMHS's ReplayDetect function 3 times to use up the pause. although its exaggerating to use it 3 times instead of pause unpause 3 times like what I did.