|
Post by perhaps on Oct 3, 2008 3:32:56 GMT -5
///Leaver///
Events -Player - Player 1 (Red) leaves the game -Player - Player 2 (Blue) leaves the game -Player - Player 3 (Teal) leaves the game -Player - Player 4 (Purple) leaves the game -Player - Player 5 (Yellow) leaves the game -Player - Player 6 (Orange) leaves the game -Player - Player 7 (Green) leaves the game -Player - Player 8 (Pink) leaves the game -Player - Player 9 (Gray) leaves the game -Player - Player 10 (Light Blue) leaves the game -Player - Player 11 (Dark Green) leaves the game -Player - Player 12 (Brown) leaves the game
Conditions
Actions -Game - Display to (All players) the text: ((Name of (Triggering player)) + has left the game.) This will of course inform people when someone leaves. It's annoying going five minutes into a game before you finally realize someone has left.
///Set Game Speed///
Events -Map initialization
Conditions
Actions -Game - Set game speed to Fastest -Game - Lock the game speed
Needless to say it doesn't have to be fastest, but this is to force the game speed as you intend it to be played in.
|
|
|
Post by Burning Rose on Oct 3, 2008 17:57:24 GMT -5
Ah, that second one is helpful, didn't know there was such a trigger. i'll add that.
It does display a message when someone leaves, however. I'll be adding a sound to accompany that in .93
|
|
|
Post by perhaps on Oct 4, 2008 5:44:06 GMT -5
I wasn't making suggestions specifically towards your map with this, it's intent being simply a thread of "must-have" triggers for maps in general. But it's nice that you can make use of one.
World Edit can be surprising like that, "it has that?"
|
|
|
Post by Burning Rose on Oct 4, 2008 13:01:50 GMT -5
Oh, okay then
|
|
|
Post by perhaps on Nov 7, 2008 19:40:08 GMT -5
Well, I'd say this is a matter of preference... But I'd also say if you want for better replay value on battle.net. I suggest this...
JASSfunction EndTheGame takes nothing returns nothing call CustomVictoryBJ( GetEnumPlayer(), false, false ) endfunction
function Victory takes player p returns nothing call DisplayTextToForce( GetPlayersAll(), "Player "+I2S(GetConvertedPlayerId(p))+" has won!" ) call PolledWait(3.00) call ForForce( GetPlayersAll(), function EndTheGame ) endfunction
And an example use for this...function ForTheWin takes nothing returns nothing call Victory(GetTriggerPlayer()) endfunction
//=========================================================================== function InitTrig_ForTheWin takes nothing returns nothing set gg_trg_ForTheWin = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(0), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(1), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(2), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(3), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(4), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(5), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(6), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(7), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(8), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(9), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(10), "-ftw", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ForTheWin, Player(11), "-ftw", true ) call TriggerAddAction( gg_trg_ForTheWin, function ForTheWin ) endfunction
GUIWin Events Player - Player 1 (Red) types a chat message containing -ftw as An exact match Player - Player 2 (Blue) types a chat message containing -ftw as An exact match Player - Player 3 (Teal) types a chat message containing -ftw as An exact match Player - Player 4 (Purple) types a chat message containing -ftw as An exact match Player - Player 5 (Yellow) types a chat message containing -ftw as An exact match Player - Player 6 (Orange) types a chat message containing -ftw as An exact match Player - Player 7 (Green) types a chat message containing -ftw as An exact match Player - Player 8 (Pink) types a chat message containing -ftw as An exact match Player - Player 9 (Gray) types a chat message containing -ftw as An exact match Player - Player 10 (Light Blue) types a chat message containing -ftw as An exact match Player - Player 11 (Dark Green) types a chat message containing -ftw as An exact match Player - Player 12 (Brown) types a chat message containing -ftw as An exact match Conditions Actions Game - Display to (All players) the text: ((Player + (String((Player number of (Triggering player))))) + has won!) Wait 3.00 game-time seconds Player Group - Pick every player in (All players) and do (Actions) Loop - Actions Game - Victory (Picked player) (Skip dialogs, Skip scores)
Purpose What this does, is displays the victor as a game/text message to everyone instead of using the dialog boxes to do so. And after a set period of time this is displayed, you'll be taken directly to channel or first screen after logon. There's no reason to let someone know they've won when the game text already shows that, there's no reason to show game scores which are designed for melee. The main point to this is to get everyone out of the game completely so that there isn't some annoying bastard AFK holding that game name for who knows how long.
It's shocking that this isn't used on just about every map as well as I haven't seen it used on any map.
|
|