# \#gamestate

**URL:** https://forums.unrealengine.com/tag/gamestate/3005.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [Replication race condition between Replicated GameState and RPC call on client.](https://forums.unrealengine.com/t/replication-race-condition-between-replicated-gamestate-and-rpc-call-on-client/2403583)

<div class="topic-metadata">

**Author:** [@SkankHunt1000](https://forums.unrealengine.com/u/SkankHunt1000)\
**Replies:** 7\
**Last updated:** [March 22, 2025, 8:40pm UTC](https://forums.unrealengine.com/t/replication-race-condition-between-replicated-gamestate-and-rpc-call-on-client/2403583 "2025-03-22T20:40:58Z")

</div>

Hello, I’m working on a multiplayer card game. Think of my game flow as a state machine. And in each state, there will be data going from the server to the client, and then back again. State machine: Player1 does som…

---

## [Making a score / currency system for multiplayer](https://forums.unrealengine.com/t/making-a-score-currency-system-for-multiplayer/1877165)

<div class="topic-metadata">

**Author:** [@Kev\_Dogg](https://forums.unrealengine.com/u/Kev_Dogg)\
**Replies:** 0\
**Last updated:** [May 28, 2024, 3:03pm UTC](https://forums.unrealengine.com/t/making-a-score-currency-system-for-multiplayer/1877165 "2024-05-28T15:03:43Z")

</div>

Hello, I’m currently trying to make a multiplayer score system for my game and would appreciate some insight on how I’d go about making it. In a level all players score will start at 0, and for every object a player br…

---

## [How to start spectating from clients?](https://forums.unrealengine.com/t/how-to-start-spectating-from-clients/450472)

<div class="topic-metadata">

**Author:** [@Wiresharkk](https://forums.unrealengine.com/u/Wiresharkk)\
**Replies:** 18\
**Last updated:** [April 27, 2024, 6:51pm UTC](https://forums.unrealengine.com/t/how-to-start-spectating-from-clients/450472 "2024-04-27T18:51:19Z")

</div>

Hello, I have a blueprint-basded PlayerState, and I would like to set a player as spectator. The only way I found to achieve this would be to set bIsSpectator to true. The problem is that bIsSpectator is a blueprint read…

---

## [How to organize classes more than one GameMode/GameState.](https://forums.unrealengine.com/t/how-to-organize-classes-more-than-one-gamemode-gamestate/1672736)

<div class="topic-metadata">

**Author:** [@Luqaz](https://forums.unrealengine.com/u/Luqaz)\
**Replies:** 2\
**Last updated:** [February 9, 2024, 8:56pm UTC](https://forums.unrealengine.com/t/how-to-organize-classes-more-than-one-gamemode-gamestate/1672736 "2024-02-09T20:56:27Z")

</div>

Looking for some advice how to organize communication between Game Modes, Game States, Characters etc. I’m facing a problem, when I have one a bit complex PlayerCharacter class where part of the functionality is directl…

---

## [Best practice to store cross-level state](https://forums.unrealengine.com/t/best-practice-to-store-cross-level-state/1593260)

<div class="topic-metadata">

**Author:** [@Count.Numbers](https://forums.unrealengine.com/u/Count.Numbers)\
**Replies:** 3\
**Last updated:** [January 8, 2024, 1:54pm UTC](https://forums.unrealengine.com/t/best-practice-to-store-cross-level-state/1593260 "2024-01-08T13:54:24Z")

</div>

Hey all, I’m developing a single player game with many levels. The player transitions between those levels frequently, and both the levels and the players need to preserve state. E.g., door actors need to remember wheth…

---

## [Replicating from GameState](https://forums.unrealengine.com/t/replicating-from-gamestate/1414271)

<div class="topic-metadata">

**Author:** [@Barbo6.9](https://forums.unrealengine.com/u/Barbo6.9)\
**Replies:** 1\
**Last updated:** [November 24, 2023, 12:53am UTC](https://forums.unrealengine.com/t/replicating-from-gamestate/1414271 "2023-11-24T00:53:07Z")

</div>

Hi, I am still unfamiliar with replicating and I have been stuck on this problem for a while. In my character class, I pass self (the character) to the game state as custom player array, and I’m also trying to add the sp…

---

## [How to load GameState data from a save file?](https://forums.unrealengine.com/t/how-to-load-gamestate-data-from-a-save-file/1307892)

<div class="topic-metadata">

**Author:** [@II\_ADN\_II](https://forums.unrealengine.com/u/II_ADN_II)\
**Replies:** 4\
**Last updated:** [September 23, 2023, 3:04pm UTC](https://forums.unrealengine.com/t/how-to-load-gamestate-data-from-a-save-file/1307892 "2023-09-23T15:04:40Z")

</div>

Hi, I was trying to save game state variables but found out that the game state gets constructed AFTER loading (loading happens before beginPlay) so its not loading with the rest of the actors. This seems to be by design…

---

## [Custom GameState class does not tick](https://forums.unrealengine.com/t/custom-gamestate-class-does-not-tick/1244180)

<div class="topic-metadata">

**Author:** [@NightmareGames](https://forums.unrealengine.com/u/NightmareGames)\
**Replies:** 7\
**Last updated:** [August 7, 2023, 11:23pm UTC](https://forums.unrealengine.com/t/custom-gamestate-class-does-not-tick/1244180 "2023-08-07T23:23:58Z")

</div>

I have a GameState class which inherits from AGameStateBase. The BeginPlay() method fires correctly, but no breakpoints or functionality are hit in the Tick() function. #include "CustomGameState.h" void ACustomGameSta…

---

## [Debugging a Blueprint Runtime Error: "Accessed None trying to read property" when trying to access GameState](https://forums.unrealengine.com/t/debugging-a-blueprint-runtime-error-accessed-none-trying-to-read-property-when-trying-to-access-gamestate/1238338)

<div class="topic-metadata">

**Author:** [@NightmareGames](https://forums.unrealengine.com/u/NightmareGames)\
**Replies:** 4\
**Last updated:** [July 29, 2023, 7:49am UTC](https://forums.unrealengine.com/t/debugging-a-blueprint-runtime-error-accessed-none-trying-to-read-property-when-trying-to-access-gamestate/1238338 "2023-07-29T07:49:52Z")

</div>

I’m getting the error during runtime (presumably on every tick): Blueprint Runtime Error: "Accessed None trying to read property As Mech Game State". Node: Return Node Graph: GetText\_1 Function: Get Text 1 Blueprint:…

---

## [Problems interacting with GameState](https://forums.unrealengine.com/t/problems-interacting-with-gamestate/1234466)

<div class="topic-metadata">

**Author:** [@NightmareGames](https://forums.unrealengine.com/u/NightmareGames)\
**Replies:** 1\
**Last updated:** [July 20, 2023, 8:30am UTC](https://forums.unrealengine.com/t/problems-interacting-with-gamestate/1234466 "2023-07-20T08:30:56Z")

</div>

I’m attempting to create a UI that counts and displays the number of enemies in the level. It stands to reason this logic would need to be in some class that transcends any particular actor. After some digging, I came …

---

## [Player array in the game state has the wrong player state classes](https://forums.unrealengine.com/t/player-array-in-the-game-state-has-the-wrong-player-state-classes/420383)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_aa967a7a](https://forums.unrealengine.com/u/anonymous_user_aa967a7a)\
**Replies:** 2\
**Last updated:** [March 25, 2023, 7:11pm UTC](https://forums.unrealengine.com/t/player-array-in-the-game-state-has-the-wrong-player-state-classes/420383 "2023-03-25T19:11:41Z")

</div>

As explained in the title, when calling “player array” from my custom game state I don’t get the classes I’m supposed to get. I have: DeathMatchGameMode (child blueprint of my BasicGameMode which is a child of GameMode…

---

## [Is it better to declare in header  when using GameState?](https://forums.unrealengine.com/t/is-it-better-to-declare-in-header-when-using-gamestate/757800)

<div class="topic-metadata">

**Author:** [@dakdak125](https://forums.unrealengine.com/u/dakdak125)\
**Replies:** 1\
**Last updated:** [January 27, 2023, 1:54pm UTC](https://forums.unrealengine.com/t/is-it-better-to-declare-in-header-when-using-gamestate/757800 "2023-01-27T13:54:34Z")

</div>

or what is the better?

---

## [2 timers, allow 1 to run while game is paused?](https://forums.unrealengine.com/t/2-timers-allow-1-to-run-while-game-is-paused/755475)

<div class="topic-metadata">

**Author:** [@cnapsys](https://forums.unrealengine.com/u/cnapsys)\
**Replies:** 96\
**Last updated:** [January 26, 2023, 2:23am UTC](https://forums.unrealengine.com/t/2-timers-allow-1-to-run-while-game-is-paused/755475 "2023-01-26T02:23:57Z")

</div>

Hey all, need a bit of guidance figuring out how to approach this. When my game loads I have a Set Game Paused (true) in my GameMode. After that, I load a MainMenu widget. I also have a Countdown Timer here (that ends …

---

## [\[Multiplayer\] Get player array & set it on UMG for both server/clients](https://forums.unrealengine.com/t/multiplayer-get-player-array-set-it-on-umg-for-both-server-clients/432015)

<div class="topic-metadata">

**Author:** [@Debaucher](https://forums.unrealengine.com/u/Debaucher)\
**Replies:** 6\
**Last updated:** [January 25, 2023, 10:54pm UTC](https://forums.unrealengine.com/t/multiplayer-get-player-array-set-it-on-umg-for-both-server-clients/432015 "2023-01-25T22:54:22Z")

</div>

The script only prints the host’s player name. Clients aren’t being produced on the server nor other clients. How can I get this to work properly? Do I need to be running something on server? Thanks in advance!

---

## [Multiplayer client has two GameStates](https://forums.unrealengine.com/t/multiplayer-client-has-two-gamestates/486184)

<div class="topic-metadata">

**Author:** [@hagier](https://forums.unrealengine.com/u/hagier)\
**Replies:** 0\
**Last updated:** [July 14, 2021, 10:23am UTC](https://forums.unrealengine.com/t/multiplayer-client-has-two-gamestates/486184 "2021-07-14T10:23:08Z")

</div>

I’m having struggle with GameState. My custom GameState is child of Game State Base. GameMode (child of Game Mode Base) is updating some variables in my GameState. But my clients have two separate GameStates as illustrat…

---

## [Clean way to get variables from game instance to server?](https://forums.unrealengine.com/t/clean-way-to-get-variables-from-game-instance-to-server/485681)

<div class="topic-metadata">

**Author:** [@Maffinius](https://forums.unrealengine.com/u/Maffinius)\
**Replies:** 1\
**Last updated:** [July 12, 2021, 12:00pm UTC](https://forums.unrealengine.com/t/clean-way-to-get-variables-from-game-instance-to-server/485681 "2021-07-12T12:00:14Z")

</div>

Hey all, iam trying to get a simple integer from the game instance to the game server when/after loading the main level. But it seems like iam doing something fundamentally wrong (i guess) because nothing i have tried w…

---

## [Player Controller from Game State](https://forums.unrealengine.com/t/player-controller-from-game-state/481838)

<div class="topic-metadata">

**Author:** [@Barbo6.9](https://forums.unrealengine.com/u/Barbo6.9)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 2:50am UTC](https://forums.unrealengine.com/t/player-controller-from-game-state/481838 "2021-04-15T02:50:58Z")

</div>

Hey, so basically I have a multiplayer game, where players can activate an event from input. This event activates another one in Game State. However I need to know which Player Controller is activating inside the Game St…

---

## [GameState replication on listen server](https://forums.unrealengine.com/t/gamestate-replication-on-listen-server/476245)

<div class="topic-metadata">

**Author:** [@Chorstikus](https://forums.unrealengine.com/u/Chorstikus)\
**Replies:** 6\
**Last updated:** [December 29, 2020, 5:21pm UTC](https://forums.unrealengine.com/t/gamestate-replication-on-listen-server/476245 "2020-12-29T17:21:23Z")

</div>

Hey guys, I have added an round variable to my GameState which gets replicated. After each kill it gets incremented and a multicast delegate event gets broadcasted. Now in my HUD (UserWidget) I would like to show this …

---

## [GameState only for networking?](https://forums.unrealengine.com/t/gamestate-only-for-networking/472067)

<div class="topic-metadata">

**Author:** [@Pyramider](https://forums.unrealengine.com/u/Pyramider)\
**Replies:** 0\
**Last updated:** [September 28, 2020, 1:41pm UTC](https://forums.unrealengine.com/t/gamestate-only-for-networking/472067 "2020-09-28T13:41:44Z")

</div>

So this is the question? I can see how using the GameState system is beneficial for several reasons when building a multiplayer game. However, when making for instance, a singleplayer turn-based game, is there any other …

---

## [Multiplayer GameMode GameState](https://forums.unrealengine.com/t/multiplayer-gamemode-gamestate/466236)

<div class="topic-metadata">

**Author:** [@airwaysf](https://forums.unrealengine.com/u/airwaysf)\
**Replies:** 0\
**Last updated:** [June 4, 2020, 12:50pm UTC](https://forums.unrealengine.com/t/multiplayer-gamemode-gamestate/466236 "2020-06-04T12:50:57Z")

</div>

In my card game i need show to players different cards location.Gamemode has refs to all cards. Which classes must handle the logic of card distribution

---

## [Player array does not replicate](https://forums.unrealengine.com/t/player-array-does-not-replicate/464649)

<div class="topic-metadata">

**Author:** [@anon685683](https://forums.unrealengine.com/u/anon685683)\
**Replies:** 2\
**Last updated:** [May 10, 2020, 12:15pm UTC](https://forums.unrealengine.com/t/player-array-does-not-replicate/464649 "2020-05-10T12:15:42Z")

</div>

After upgrading my game to 4.21, the player array was no longer replicated. Only the client receives no names. My attempts to change the source code didn’t work either. Please help me! AGreE70

---

## [Replicating a variable in a custom AGameState breaks playercontroller on client](https://forums.unrealengine.com/t/replicating-a-variable-in-a-custom-agamestate-breaks-playercontroller-on-client/379788)

<div class="topic-metadata">

**Author:** [@aa1000](https://forums.unrealengine.com/u/aa1000)\
**Replies:** 5\
**Last updated:** [April 14, 2020, 3:49am UTC](https://forums.unrealengine.com/t/replicating-a-variable-in-a-custom-agamestate-breaks-playercontroller-on-client/379788 "2020-04-14T03:49:07Z")

</div>

When I put a replicated variable in a custom C++ AGameState and connect through a session ,the server PlayerController spawns normally but the game breaks on the clients, I’m sure that the BeginPlay() event is not called…

---

## [How do i make custom GameState work?](https://forums.unrealengine.com/t/how-do-i-make-custom-gamestate-work/460821)

<div class="topic-metadata">

**Author:** [@Abdul\_Hasan\_Ali](https://forums.unrealengine.com/u/Abdul_Hasan_Ali)\
**Replies:** 1\
**Last updated:** [January 21, 2020, 9:41pm UTC](https://forums.unrealengine.com/t/how-do-i-make-custom-gamestate-work/460821 "2020-01-21T21:41:47Z")

</div>

I added a custom GameState class that overrides the AGameState class. I just added the following code: ATanksGameState::ATanksGameState() { } void ATanksGameState::HandleBeginPlay() { Super::HandleBeginPlay(…

---

## [Get game state inside Editor Widget](https://forums.unrealengine.com/t/get-game-state-inside-editor-widget/457639)

<div class="topic-metadata">

**Author:** [@FeyDreamers](https://forums.unrealengine.com/u/FeyDreamers)\
**Replies:** 15\
**Last updated:** [November 3, 2019, 1:47am UTC](https://forums.unrealengine.com/t/get-game-state-inside-editor-widget/457639 "2019-11-03T01:47:40Z")

</div>

I have an Editor Widget and inside of it I created a blueprint for some button click event. Unfortunately, when I use the “Get game state” node (or any similar), it always returns null. I understand that it’s correct w…

---

## [Actor array in Game State not replicated](https://forums.unrealengine.com/t/actor-array-in-game-state-not-replicated/406150)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_f7c0f7221](https://forums.unrealengine.com/u/anonymous_user_f7c0f7221)\
**Replies:** 5\
**Last updated:** [September 18, 2019, 12:15pm UTC](https://forums.unrealengine.com/t/actor-array-in-game-state-not-replicated/406150 "2019-09-18T12:15:59Z")

</div>

Hi, I am creating an RTS in UE4. I’m trying to use game state to replicate each faction’s units references. On the server, the values appear as expected but on the client, the array appears with “None” instead of a re…

---

## [How to load client's variables after joining a session](https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916)

<div class="topic-metadata">

**Author:** [@Thura\_Oo](https://forums.unrealengine.com/u/Thura_Oo)\
**Replies:** 4\
**Last updated:** [August 2, 2019, 6:02pm UTC](https://forums.unrealengine.com/t/how-to-load-clients-variables-after-joining-a-session/354916 "2019-08-02T18:02:42Z")

</div>

Hello everyone. I’m having trouble with loading client variables (which are saved before joining a session) after joining a session. I’ll explain my problem first. I’m writing a 2 player fighting game with blueprints. …

---

## [Stop from losing Game State/ Player State getting reset after Server Travel?](https://forums.unrealengine.com/t/stop-from-losing-game-state-player-state-getting-reset-after-server-travel/386964)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_b51fff0e1](https://forums.unrealengine.com/u/anonymous_user_b51fff0e1)\
**Replies:** 4\
**Last updated:** [July 6, 2019, 9:41am UTC](https://forums.unrealengine.com/t/stop-from-losing-game-state-player-state-getting-reset-after-server-travel/386964 "2019-07-06T09:41:02Z")

</div>

I’m calling Server Travel on the end of a ‘match’ and we’re going into a ‘Post Game’ Lobby. However, when I grab the game state/player states, it seems the ‘Score’ and other variables have all been reset… How can I pers…

---

## [GameMode - GameState architecture issue](https://forums.unrealengine.com/t/gamemode-gamestate-architecture-issue/446520)

<div class="topic-metadata">

**Author:** [@vsemenyakin](https://forums.unrealengine.com/u/vsemenyakin)\
**Replies:** 0\
**Last updated:** [April 3, 2019, 1:17pm UTC](https://forums.unrealengine.com/t/gamemode-gamestate-architecture-issue/446520 "2019-04-03T13:17:56Z")

</div>

GameMode - GameState architecture issue There are several places (Documentation, AnswerHub) where using of Game Mode & Game State is discribed in details. This architecture looks logical when Game Mode is small and simp…

---

## [Spawn with same character on dedicated server](https://forums.unrealengine.com/t/spawn-with-same-character-on-dedicated-server/443246)

<div class="topic-metadata">

**Author:** [@NemoLArs](https://forums.unrealengine.com/u/NemoLArs)\
**Replies:** 5\
**Last updated:** [February 12, 2019, 9:05pm UTC](https://forums.unrealengine.com/t/spawn-with-same-character-on-dedicated-server/443246 "2019-02-12T21:05:41Z")

</div>

Hello everyone! Im the dev of “Corma” (game is free on steam). I have a big issue that i cant solve by my self. I have a dedicated server that players can join and play on. Which they are. But i have a problem. When a…

---

## [RPC - Replicate GameState for just one client](https://forums.unrealengine.com/t/rpc-replicate-gamestate-for-just-one-client/442731)

<div class="topic-metadata">

**Author:** [@Porshe911](https://forums.unrealengine.com/u/Porshe911)\
**Replies:** 1\
**Last updated:** [February 4, 2019, 11:22pm UTC](https://forums.unrealengine.com/t/rpc-replicate-gamestate-for-just-one-client/442731 "2019-02-04T23:22:06Z")

</div>

Hi guys. I have the problem with this. The only way i see is hard reference of GameState in the Player Controller(or PlayerState) so for example GameMode can call RPC To Owning Client there. Is better way to do that? Tha…

[Next page](https://forums.unrealengine.com/tag/gamestate/3005.md?match_all_tags=true&page=1&tags%5B%5D=gamestate)
