Damage taken by replication but i don't want this


image

image

Hello everyone, I have a replication problem in a situation I shouldn’t have, when an enemy attacks my host player (i.e. in a client server system). He takes damage but the life bar doesn’t display it and the client also takes damage, in the first image you can see it in print in blue.
Then, with the client, the bar interacts, but this time for both players (at least the host and the client).

the problem is that I’ve tried to remove all replication of enemies, and put them in, but nothing changes, same for the main character whose widget I’ve put in viewport unlike before which was just created, and I don’t see any way to deactivate replication in the widget unless I don’t know the trick.

Thanks in advance for your answers

Overlaps should only happen on Server to do this has a SwitchHasAuthority after OnBeginOverlap.

Remove the Multicast and make any effected variables SetWithRepNotify then in the OnRep event that it created update your widgets etc

1 Like


image

and if I have to set the variable that modifies the widget in onrep to modify them in the create onrep function, then it must go through the main player and not the enemy?

im not sure what you mean on that last bit sorry, if you mean updating the LifeBar widget yes you’d call that function in the OnRep event.

even if the life bar is specific to each character? even if the life bar is specific to each character? So they don’t have to be replicated normally ?

Yep, for variables RepNotify is the normal replication.

Multicast is for Events like a SoundCue or ImpactFX

ok i will test it thanks