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.
asked Jan 02 '17 at 08:27 PM in Blueprint Scripting
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.
answered Jan 05 '17 at 03:18 PM
Sean L ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here