I con’t get it, you seem to understand why this happening as you got 2 characters on level, BeginPlay is always executed on start of actor in play mode regardless of it’s state, other init functions like PostInitComponents are called in editor placement too, thats main diffrence with BeginPlay. I think what you seeking here is player possession by player controller (or any other controller) which will event that signfies character to become alive, you can do that by overrideing :
Thing is it is only called on server, because PlayerConteroller for security reasons exist only on server, where clients only replicate Pawn actions regardless who possess or not
On the Character BeginPlay I use the Blueprint node called CREATE WIDGET and I create a new instance of the Widget Blueprint Class and add it to the viewport.
Tomorrow I will attach some screenshot, so don’t leave me alone and always take a look at this question xD
They are two Widget Blueprints: one shows “You killed…” and the other “You were killed by”.
At BeginPlay I add both to the viewport and when the two events run, they call the ChangeText() function in order to print it out on the screen the name of the killer or of the victim
So something is wrong with OnPlayerDied. I think you should create HUD widget with all the stuff and create it for each local player, when you kill someone you send right messages to right players, if your own API can’t target a specific players then you gonna hit troubles like that
Actully i think i realized why this occures, the other playercharacter add widget to all clients that it has, in fact you added 4 widgets on view port 2 for each to all clients. You should check if player is local. Try to seperate HUDs for each player, add HUD only to local player
You need to remeber that server and each client will have same copy of object and each conna be excuted sepretly but they will exist in same time (or else they are specificly created only for server or specific client). The network multiplayer is to replicate state of classes in server in to the client. So what happens here each client has same 2 characters object inb memeory, they both create widget on local viewport and both trying to display message on local viewport
You should check if player is local.
What do you mean? My game is supposed to be a Multiplayer game, and this happens also when I run 2 players (1 server/1 client)
I would like to see what happens if you add code for movement events. You may have somehow possessed the dummy character. This would be confirmed if both characters move.