Can´t send event to server

Next time please do not upload your image to a third party site because I had massive audio spam popups. The Answerhub WYSIWYG editor has an image upload feature.

What happens if you change your event that executes the door rotation logic from Executes On All to Run On Server and you call that ROS replicated event from your F key pressed event?

Good day,

I want to open a door. If my server opens the door the client and server see a opening door, but if my client opens the door only the client see the door is opening.

This is how my blueprint works:

Does somebody know how I can make my blueprint work for both?
Everybody should see if somebody opens the door.

Thanks for your help.

If I do that my server can open the door, but the client can´t see that. And the client can´t do anything.

Sorry for the late response, have you figured this out yet?

Out of curiosity is your Test (replicated to server if owning client) event executed on the server when F is pressed on a client machine? You can test this by calling PrintString within the Test event.

If it’s not I suspect it’s because the DoorFrameBP is not owned by the client. It’s probably owned by the server so therefore the Test replicated event won’t reach the server because that event has to be run on the client that owns the DoorFrameBP (the server).

I think the way you need to approach this is use your Character pawn or your Player Controller and detect when F is pressed. When it’s pressed you need to check to see if the Character is overlapping a door frame, if it is then call an event within your Character or Player Controller that is replicated to the server which then calls the door open animation on the server.

Thanks for your reply and my late answer. I will try it soon, but first I need to solve another problem^^.
I will answer you again with my results as soon as I can.

I tried it, but I have the same result as before. :S

Do you solve this problem ? I have exactly the same question as yours.

Hey, you can only call Server/Client RPCs if the object has a legit Owner, the door isn’t owned by player. What you are lookig for are NetMulticasts. They only work when executed on the server.

I answered this a few days ago. Read here and here. Implementation is C++ but the principle is the same.

So if your clients want to open the door using Multicasts, you have to route the interaction through a ServerFunction call on their Pawns or PlayerControllers (you can pass the door reference to the server). After the ServerFunction call you can call the Multicast on the door and it will replicate to every connected client.

I will try it. Thank you so much!