-
ShooterGame already does that. The players login as spectators and then when that timer that is fired on GameMode expires, it starts the game.
-
Widgets are local (client-only usually) that’s why you need an actor that replicates the info. GameState replicates, while GameMode doesn’t. Typically you fire the timer on GameState and replicate
RemainingTime
. Notice you don’t replicate theTimerHandle
itself as that’s local. For accuracy read this. -
GameMode is the class that defines game rules and decides such stuff accordingly. GameState holds and replicates the state of the game as its name suggests.
-
Inside GameState you have an array called PlayerArray. Get its size to know how many players (not bots) are there. If you want to include bots, then the AIController that owns the bot has to set
bWantsPlayerState = true
in its constructor. To do the bot part in BP, you would have to keep track of all the bots with an array in GameState. For example, BotArray. You will probably have to use GetAllActorsOfClass to get the bots.
My point still stands on reading that compendium I suggested to you in the other thread.