How to :score system in player state

Hi guys!

Would you help me?
I followed the epic steam multiplayer tutorial where we made a “player info” structure.
Could you suggest how (where?) should we add the player score when we killed a player?

The “original” player state doesn’t have an own/editable blueprint. (only has “get score”)
But if I create own player state with added variables also cannot increase the score :confused:

Thanks a lot!

Hi
You can create a playerstate BP base on the PlayerState Class, and then set your BP as the Player State Class in World Setting->Game Mode

Thanky I set up the increasing score but how should I add it into the game state to: who has the highest score will win the match?

Create your own Game Mode BP, check who has the highest score there, game mode can access all the player state.

and how can i collect/add the team players score together?
means how many points has the red and blue team for example?
for the winning it needs

Hm as far as I know
Player state contains the players score
Game state contains the teams score
Game mode contains and "decide " which team wins or loses
I made a setup ill share the pictures about it soon but still not the best one

see: Gameplay Framework in Unreal engine | Unreal Engine 5.1 Documentation
Maybe you forgot an important thing, multi player game should do things like kills and score in server, and the game mode runs only on server, so you can do it like that, when player kills,check if it’s run on server, if so ,call the game mode to add team score and then add player score
player graph:

game mode graph:

m ive done this so far but it works only on server,clients doesnt increase the team score

it seems its working this way,
what do you think about it?
it contains the team score !

That’s fine, and I have 2 suggestions: add a Switch Has Authority node to ensure the functions about score run on server(only the pawns run on server will execute the function, clients only receive the replicated result), add a replicate Enum variable as team, not a flag

you mean like this?
Its in player blueprint when killing somebody and his health is less than 0:
and the team score collecting is in game state (see above)

yes, the clients just need to receive events and data send from server