i am not sure to understand, can you define the problem a bit clearer?
if you have ActorA and ThirdPChar,
if youuse the Begin event of ActorA to set the reference to the thirdPChar , it will work until you kill and respawn that thirdPChar.
Once that is respawned you need to save the reference to the new object
The problem appears after respawning my ThirdPChar. These BP actors placed in the level have this BeginPlay to reference my ThirdPChar.
First time works fine, but after my player is killed and respawned the Object reference is set to null.
In this case I got a new instance, but when executing the aforementioned BeginPlay inside the BP actors, the object reference for the ThirdPChar is set to null despite the cast.
I changed the code deleting the BeginPlay and substituting the “My Player” variable where it occurs with the same instruction (I mean the cast with the Player Character input set to 0): in this case everything works ok, the player gets the reference.
So, my conclusion is that it is something related to the BeginPlay node.
So, I’d like to mantain the “clean code”, without calling every time the cast in order to make it work.
EDIT: I added a Delay before referencing the ThirdPChar and everything works. BUT, I believe that this approch is not really professional.