Playerstate reference stored and variables

Hello,

I’m running into a strange problem. I have a physics object that you can hit other players with which will kill them.

In order to give points when a player hits the object it casts to it and stores the playerstate ref of that player. Then if it kills a player that then casts to the stored playerstate to give a point.

This works great till the player dies (is destroyed)

When he respawns he will no longer get points.

  1. I’m assuming the reference is talking to a dead person.
  2. It’s odd the reference is not updated when they hit the object again.

I feel it’s both a replication problem and the reference I guess I’m hoping to get some input on how to store a isn’t across players for the duration of the match. I thought playerstate was a best bet

Could you post how exactly you kill a player? This will shed light on the issue. States are supposed to represent persistent data, but the GameState is the only true default unchanging source of truth. PlayerStates can be configured to work in many ways. Thanks!

I’m fixing up some things with playerstate, I’ve moved the variables to the original c++ myplayerstate instead of a blueprint child of it. (Still learning c++) once I’ve got it back to its previous state and have ruled out that it’s not because my playerstate is a child of a child. I’ll post the screen shots of the assignment of ownership and delegation of point blue prints.

Last thing, reason I’m wondering about the reference portion is because when the the object, the ball is destroyed and it respawns the players can receive points again and only thing I can think of is that the ball starts again with no references to the states again.

Turns out so far everything is working now that I’m not using a child of my child playerstate.