# Starting the gameplay between players on a (Multiplayer Shooter Game) like other (Battleground) games such as (Fortnite & etc)

**URL:** <https://forums.unrealengine.com/t/starting-the-gameplay-between-players-on-a-multiplayer-shooter-game-like-other-battleground-games-such-as-fortnite-etc/621040>\
**Category:** AI\
**Tags:** Blueprints-Programming, unreal-engine, UE5-0, Multiplayer, Blueprint, question\
**Created:** [August 4, 2022, 5:51am UTC](https://forums.unrealengine.com/t/starting-the-gameplay-between-players-on-a-multiplayer-shooter-game-like-other-battleground-games-such-as-fortnite-etc/621040 "2022-08-04T05:51:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![md.alzari](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/md.alzari/32/1205422_2.png) [@md.alzari](https://forums.unrealengine.com/u/md.alzari)\
**Post date:** [August 4, 2022, 5:51am UTC](https://forums.unrealengine.com/t/starting-the-gameplay-between-players-on-a-multiplayer-shooter-game-like-other-battleground-games-such-as-fortnite-etc/621040/1 "2022-08-04T05:51:16Z")

</div>

Hello  
First: I’m working on a **Multiplayer Battleground Shooter Game**  
**Like other games like (Fortnite, etc.)**  
I need to know what is best to work with **(Game Mode or Game State)**  **considering** the following questions and also I need some answers to them:

* * *

1- What is the best way to start the game after some time like (30 seconds) after **players join the session** and with a good number of players to start the game?

2- What is the best way to get **(timer variable)** from **(Game state or Game mode)** to **(Player Widget)**?  
It is important that the value is **accurate** with the other players.

3- What is the best way to know that the **game is over** as if one **(Team or Player)** is alive and all the others **(Players and Bots)** are dead, from **(Game Mode or Game State)**?

4- How can I get the number of **alive** **(Players and Bots)** from **(Game Mode or Game State)**

---

<div class="post-metadata">

**Author:** ![WizardCell](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wizardcell/32/1194688_2.png) [@WizardCell](https://forums.unrealengine.com/u/WizardCell)\
**Post date:** [August 10, 2022, 11:49am UTC](https://forums.unrealengine.com/t/starting-the-gameplay-between-players-on-a-multiplayer-shooter-game-like-other-battleground-games-such-as-fortnite-etc/621040/2 "2022-08-10T11:49:57Z")

</div>

1. [ShooterGame](https://docs.unrealengine.com/4.27/en-US/Resources/SampleGames/ShooterGame/) already does that. The players login as spectators and then when that timer that is fired on GameMode expires, it starts the game.

2. 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 the `TimerHandle` itself as that’s local. For accuracy read [this](https://vorixo.github.io/devtricks/non-destructive-synced-net-clock/).

3. 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.

4. 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](https://forums.unrealengine.com/t/multiplayer-game-instance-playerstate-game-mode/620459/4).

---

<div class="post-metadata">

**Author:** ![md.alzari](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/md.alzari/32/1205422_2.png) [@md.alzari](https://forums.unrealengine.com/u/md.alzari)\
**Post date:** [August 10, 2022, 3:20pm UTC](https://forums.unrealengine.com/t/starting-the-gameplay-between-players-on-a-multiplayer-shooter-game-like-other-battleground-games-such-as-fortnite-etc/621040/3 "2022-08-10T15:20:00Z")

</div>

> [@WizardCell](#):
>
> accordingly

Thank you very much.
