send a screenshot please i don’t get it when people say ‘use the game state’
i made a variable in a game state and made assign to the game mode if has authority, but when i cast through the widget i get cast failed`
`
to get the game mode through the game state
i read about it somewhere
just please tell me how
‘Game Mode’ is different from ‘Game Stat’. Game mode only lives on server side, while game stat can be accessed from both client and server. This means you can’t get ‘game mode’ on client, because it doesn’t exist there.
i know that but i want to find a was to be able to access it eg the server sets the game mode variable that is replicated and the client can get it and call event in it
You can’t get the game mode on a client. It is something that only lives on the server. What are you trying to accomplish?
Have you made any assignments to the game mode variable?
I can’t see any reason to do this. Why do you need access to the GameMode on the client? You can use RPCs to achieve whatever you want to do.
It’s not possible. The GameMode only exists on the server.
Here, this nice Tutorial should help you with the whole networking concept in UE4.
Conceptionally you don’t have the game mode on the client since it’s defining the rules and running server authoritative game logic. Whatever you try to achieve should probably be achieved differently. I’d recommend to take a moment to read through the relevant pages here (it’s not a lot and explained in a beginner friendly way):