Replication Issue :?

strong text
If my First character passes through the checkpoint,the checkpoint will also disappear for my second character.

Hello @Ez4Loki!

This is replication working correctly in its simplest forms, i.e. server replicating changes to the client.

Solution which will only work with a Dedicated Server

In your case, you want a Client RPC (i.e. run on the owning client) which the server calls whenever a skater goes through the checkpoint (on the server). Important, disable replication for the checkpoint for this to work correctly. This Client RPC will then hide the checkpoint on that particular client (say Skater01) when it runs on that client and that client only (Owning Client). But as the Client RPC only runs on the Owning Client, the checkpoint of Skater02 is not affected.


Solution which will work with Listen Servers as well

Follow the solution above for dedicated servers with a couple of changes.

  • Set the checkpoint to not replicate
  • On the instance which has authority (i.e. the listen server), simply hide checkpoint in case the Skater (Owning PlayerController/Pawn on the Listen Server) passes through the checkpoint. As the checkpoint is not replicated, it will not replicate to other clients who have not yet passed the checkpoint.
  • Use the solution above, for dedicated servers, to hide the checkpoint for other clients (i.e. connections/clients which are not the authority/listen server)

Next time, please provide Blueprint Screenshots and/or C++ Code snippets to increase the likelihood of getting an answer to your question.

Hope this helps. Have a nice day!

1 Like

If the check point is replicated and you are using an overlap event (Begin Overlap)… Simply add Switch has Authority out of the execution pin. This will only trigger when the Authoritative proxy overlaps on the servers sim. This will prevent the client from directly cheating and calling RPC’s without ever crossing.

1 Like


Check My blueprint

Second for each loop isn’t needed and it’s in the wrong place. If you are going to keep it, then hook it up to the first loops “completed” pin.

Second image…
On component end overlap (Trigger) → Switch has Authority (Authority) → cast etc etc.

This ensures that the server is executing without the need for an RPC.

You can take this a bit further by making it so only Pawns can trigger the end overlap. In the collision settings (trigger) do custom and ignore all, overlap pawn.

For the dot product math/branch you can use Get Root → Get world rotation → get rot X… This should eliminate the need for casting.

Your Arrow is a child of the root (capsule component if using CMC). So it should be facing the correct direction.

@Rev0verDrive The approach you suggested, with setting the Checkpoint as a replicated entity and then only handling the OnComponentBeginOverlap delegate/event there won’t work as far as I understand. I am in no way an expert on replication and would like to understand more, if I seem to be missing something here.

  • if the Checkpoint is replicated and we hide its visibility on the server (because one skater passed through it), then it will be hidden for all clients. This is not what OP wanted.
  • you are right, in that incorrectly or naively set up Server RPCs can be a gateway for clients to cheat. OP would have to check if the Owning Clients pawn is actually overlapping the Checkpoint in this case, to avoid cheating, for example.

@Ez4Loki I glanced over your blueprint screenshots. It appears to be consistent with what you want your checkpoints to do. But you appear to nowhere be differentiating between logic running on the server and on the client. The RPC solution I suggested does not appear to be anywhere either, in any way, shape or form. If you are not familiar with how networking in the Engine works at all, please go through some documentation. Introduction | An Unreal Engine Blog by Cedric Neukirchen (cedric-neukirchen.net) could be a great start.

You have to split the load.

Server replicates the actual check point actor (authoritative collision)

Client spawns a client checkpoint (Visual elements). It’ll need a collision to hide mesh/fx, then disable the collision. OR destroy the actor.


Begin play → Switch has authority (Remote) → get local role == Autonomous → Branch
[True] → Get all actors of class (server check point) → for each Loop…
cast to server CP → spawn client checkpoint…use server cp location and rotation.

Client CP triggers locally on the pawn. Hides box, disables collision.

Server CP Overlaps on the Authority. You have to add additional logic to check if previous CP’s have been sequential triggered, but other than that you’re done.

Ok so I built a demo. Works perfectly. You just need to work out the sequential check logic.
e.g. CP 1 → 2 → 3 etc not counting/processing out of order triggering. Trivial process at best.

BP_ServerCP


BP_ClientCP


Character Class…

Begin Play

Event: Spawn Local Check Points

2 Likes