Announcement

Collapse
No announcement yet.

Changes in the world in multiplayer.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changes in the world in multiplayer.


    Hi,

    I'm starting to develop with UE4, but I have a problem. I have created functions to open / close doors and take objects from the world and put them in front of you and release them. The problem is that when opening doors or catching an object, the other player does not see the changes, he still sees the door closed and the object on the ground.

    I hope someone can help me, thank you very much.

    #2
    Have you learned about replication in UE4? I would start there.

    Comment


      #3

      Ok thanks, I didn't know that this type of event was called 'replication'. At this moment I am documenting myself about it: https://docs.unrealengine.com/latest...1_5/index.html

      Comment


        #4
        I'm going crazy. I have created a function to grab and drop objects from the world, but at the time of running it in multiplayer the server can do it and reflect the changes in the clients, but this is not so when you do it on the client, it is not reflected on the server .
        I've tried using 'Replicate: Run on server', and other things, but I can not get it to work on the client side.

        I have tried to call the functions that the client executes (Switch Has Authority: Remote) with 'Executes On Server Custom Event', but the client can't grab or drop objects then.

        Could someone give me a hand? Thank you very much.
        Attached Files
        Last edited by Alvariitop; 10-21-2017, 01:17 PM.

        Comment


          #5
          Hello, I think your Actor has no owning connection. Do you get a warning in your Output Log (Window -> Developer Tools -> Output Log)?

          Comment


            #6
            Originally posted by Phoenix100 View Post
            Hello, I think your Actor has no owning connection. Do you get a warning in your Output Log (Window -> Developer Tools -> Output Log)?
            I don't get a warning in Grab/Drop function, i only get warning in the door function that it doesn't work neither (but i want fix grab/drop function after).

            I just want the function work just like the server (which when it grabs and leaves an object all the clients see it), i want that if the client grabs an object the server and the rest can see it, and not that only he sees it. I do not know how to give the necessary permissions to the client to do that. (If I create a custom event on the client with 'Run On Server' the client can not directly grab objects).

            Thanks.

            Comment

            Working...
            X