Is the button a Dialog Box button? or an Ability? or a Dummy Item sold?.
I'll give some clues.
You need 4 variables:
1- A PlayerGroup (matching Players status: User, and Player is Playing).
2- An Integer variable (PlayerQ) to know the amount of players in PlayerGroup
3- A Boolean Variable array (WaveActv), to know if the player has already activated the next wave.
4- A Integer variable to know the amount of players that has already activated next wave. (ActvPlayers) (Edited)
-> On Map Init you need to set the PlayerGroup force.
-> Declare the number of Players in PlayerGroup into PlayerQ.
-> When the player activates next wave, set WaveActv[Player Number of Triggering Player] = true. The condition to activate the next wave, is having WaveActv[Player Number of Triggering Player] = false
-> When player activates next wave, set ActvPlayers = (ActvPlayers + 1)
-> If "ActvPlayers = PlayerQ" means that all players has activatd the next wave. Then set ActvPlayers = 0, reset the WaveAct[Player Number] to false, and start the wave.
-> If a player leaves, you have to update the PlayerQ variable.
May not be very precise, but may give you some clue.
EDIT: Actually, doesn't need the "Real variable". Change it for Integer.