Okay so i have an RPG i'm making, about 60% in, and it is for 6 players.
So here's the plan:
A player types '-duel' and a message pops up for everyone else saying would you like to duel, if EVERYONE in the game says 'accept' they are telported to the arena, if the timer expires, the arena doesn't start. In a way it is like the switching system in Dota. I attempted to make my own version, but it is probably so incredibly wrong that it's embarrassing. Here's my current triggers which are probably nowhere near working:
Sorry for giving you so much work, but think of it as practice, and i'll give u rep
So here's the plan:
A player types '-duel' and a message pops up for everyone else saying would you like to duel, if EVERYONE in the game says 'accept' they are telported to the arena, if the timer expires, the arena doesn't start. In a way it is like the switching system in Dota. I attempted to make my own version, but it is probably so incredibly wrong that it's embarrassing. Here's my current triggers which are probably nowhere near working:
Code:
Arena Suggest
Events
Player - Player 1 (Red) types a chat message containing -duel as An exact match
Player - Player 2 (Blue) types a chat message containing -duel as An exact match
Player - Player 3 (Teal) types a chat message containing -duel as An exact match
Player - Player 4 (Purple) types a chat message containing -duel as An exact match
Player - Player 5 (Yellow) types a chat message containing -duel as An exact match
Player - Player 6 (Orange) types a chat message containing -duel as An exact match
Conditions
Actions
Game - Display to (All players) the text: Do you wish to comp...
Game - Display to (Player group((Triggering player))) the text: |cffFFFAF0Invitatio...
Set GurubCountDown = (Number of players)
Trigger - Turn on Accept Typing <gen>
Wait 60.00 seconds
Set GurubCountDown = (Number of players)
Trigger - Turn off (This trigger)
Code:
Arena Accept Typing
Events
Player - Player 1 (Red) types a chat message containing -accept as An exact match
Player - Player 2 (Blue) types a chat message containing -accept as An exact match
Player - Player 3 (Teal) types a chat message containing -accept as An exact match
Player - Player 4 (Purple) types a chat message containing -accept as An exact match
Player - Player 5 (Yellow) types a chat message containing -accept as An exact match
Player - Player 6 (Orange) types a chat message containing -accept as An exact match
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PlayerTyped[(Player number of (Triggering player))] Greater than or equal to (PlayerTyped[(Player number of (Triggering player))] + 2)
Then - Actions
Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: You can only vote o...
Else - Actions
Set PlayerTyped[(Player number of (Triggering player))] = (PlayerTyped[(Player number of (Triggering player))] + 1)
Set GurubCountDown = (GurubCountDown - 1)
Game - Display to (All players) the text: ((String(GurubCountDown)) + |cffFFFAF0more votes needed for Gurubashi Arena to start.)
Code:
Arena Initialisation
Events
Conditions
GurubCountDown Equal to 1
Actions
Game - Display to (All players) for 5.00 seconds the text: |cffFF4500Gurubashi...
Wait 3.00 seconds
Unit - Move Hero[1] instantly to (Center of NEEnterGurubashi <gen>)
Unit - Set life of Hero[1] to (Max life of Hero[1])
Unit - Move Hero[2] instantly to (Center of NEEnterGurubashi <gen>)
Unit - Set life of Hero[2] to (Max life of Hero[2])
Unit - Move Hero[3] instantly to (Center of NEEnterGurubashi <gen>)
Unit - Set life of Hero[3] to (Max life of Hero[3])
Unit - Move Hero[3] instantly to (Center of OrcEnterGurubashi <gen>)
Unit - Set life of Hero[4] to (Max life of Hero[4])
Unit - Move Hero[5] instantly to (Center of OrcEnterGurubashi <gen>)
Unit - Set life of Hero[5] to (Max life of Hero[5])
Unit - Move Hero[6] instantly to (Center of OrcEnterGurubashi <gen>)
Unit - Set life of Hero[6] to (Max life of Hero[6])
Sorry for giving you so much work, but think of it as practice, and i'll give u rep