Gamepad event not triggering multicast function

In a multiplayer project I have a barrier that opens up to allow the player to progress to the next area, however when the replicated multicast custom event is called by pressing X on the gamepad, nothing happens unless I am playing as the server. (When controlling the server character everything works correctly)

However when the exact same code is called through a BeginOverlap of a collision box, everything works correctly for both the client and the server. They are both able to see and trigger the barrier opening and are able to pass through to the next area.

When controlling the client character and pressing X, the “Print String” is shown on the screen to indicate the button press has been detected, but nothing happens. The barrier remains closed. The string reads “Client 1: Input Detected”.
The players and the barrier are both set to replicate, and the “Unlock Barrier” custom event is set to “Multicast”.

Is there a reason why this is only working by being triggered through an overlap instead of a button press? Again, the button press works on the server, but not on the client. Any help would be great. Thanks.

Hey JGock,

Just by looking at the blueprints, if you’re using a Switch Has Authority after your input, and the input is coming from the client-side, then I wouldn’t expect the Unlock Barrier event to fire. Just as a test for curiosity’s sake, try removing that check or connecting the Remote pin instead of the Authority pin.

Let me know the results of that check.

When I connect “Unlock Barrier” to the Remote pin only, the client could press X to open the barrier, but the server saw no movement at all. When I completely removed the authority check the server could open the barrier for all players, but the client could only open it for themselves.

Maybe I’m going about this the wrong way, so here’s a quick recap of what I’m trying to achieve.

  • Player (Server or Client) walks up to barrier.
  • Player presses X
  • Custom Event (Multicast) is called from Barrier BP to move the obstruction (using a timeline).
  • All Clients and the Server see the barrier move and are now able to pass into the next zone.

The reason I included an authority check in the first place was because I was trying to have the “Unlock Barrier” function always be called on the server (no matter who called it), but have each connected client see the outcome.

I’ve created a simple blueprint that you can use to get your event to trigger. So in my case, I just wanted to set up movement for an actor. So on F, call my Move custom event that sets my actor location. For you, your custom event would be the one that unlocks the barrier.

You can use the screenshot below as a template to set your unlock barrier event up and then it should replicate properly as long as the actor is set to replicate and replicate movement (meaning the barrier blueprint in this case).

Let me know how that works for you.