Announcement

Collapse
No announcement yet.

Multiplayer replication issue.

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

    Multiplayer replication issue.

    I have this part in an enemy animation blueprint :
    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	48.9 KB
ID:	1140958
    In the server side it will always work, however, in the client side it will always returns null, no matter how many loops with delays i iterate on it. how am i supposed to get the pawn owner of this blueprint like that ? i'v tried to take this value and send it with events like "run on server" and then use "multicast" and still it was always null for the client.
    Is it a bug? how do i fix that ? I'm using UE4.5.

    Also, when i print stuff while playing with 2 players, the prints looks like :
    PHP Code:
    server hello
    client 
    hello 
    But when i click on the "~" key, this is all gone, and these prints are sometimes useless if they go away too fast.
    Is there a way to make them stay ?
    Last edited by Sahkan; 11-18-2014, 07:44 PM.
    Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

    #2
    Ok i'v just tried this one and it gives me the animation blueprint like it should, but for some reason i can't assign the character to the animation blueprint.
    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	111.6 KB
ID:	1061236
    Last edited by Sahkan; 11-19-2014, 02:45 PM.
    Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

    Comment


      #3
      Also the client is get null out of this node :
      Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	86.1 KB
ID:	1061255
      Is it a bug ? A multiplayer thing ? How do i fix that ? Anyone?...
      Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

      Comment


        #4
        Am i the only one with those issues?
        Can anyone confirm that he did the same thing and it worked for him ?
        Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

        Comment


          #5
          Ok now i can say for sure that the AI Controller is not being replicated to the client.
          Tick evets won't occur in the client side. Is there any special thing that has to be done in order to replicate the AI Controller to the client ?
          I have the replicate checkbox checked and also tried to apply it at runtime via the server side. Any idea ?...

          Edit : Ok i'v solved the damned issue !
          I had to check the "Always Relevant" Checkbox in the my enemy Controller blueprint :
          Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	36.9 KB
ID:	1061315
          And now things are working as it should for this enemy, at last!
          Last edited by Sahkan; 11-21-2014, 01:21 PM.
          Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

          Comment


            #6
            Hey Sahkan,

            I'm glad you were able to work around the issue you were facing. I wanted to let you know, however, that generally the controller is not intended to be replicated. The controller is where you want to store your movement rules and inputs, while data and anything client specific should be done in either the player state or the player character. While this solution of manually replicating the controller might help you now, it could also cause problems with multiple replication later on. My suggestion would be to try moving all of this functionality that is client specific to the character instead.

            Cheers!

            Comment


              #7
              I strongly recommend you look over these videos: https://docs.unrealengine.com/latest...SFPRiBpwe5sTwc

              If you already have, go through them again. Watch them over and over until you really understand network replication. This is a difficult topic, and one of the more challenging programming concepts to understand in game development in general. There are engineers who do this as their living, so don't feel bad if it's difficult. There is also the network example scene that comes with the UE4 content examples project- look over that!

              Can you better explain what you are trying to do? Don't get into specifics, just in layman's terms, what do you want to have happen right now?
              Lighting Technical Director | Co-Founder
              Game School Online

              Want to learn Unreal Engine 4 and game development from professionals that have worked on games at studios like Call of Duty, Battlefield, Last of Us, Riot Games, Blizzard, and more? Checkout Game School Online, the first ever fully featured, structured online game development training platform that is completely free, no strings attached: https://beta.gameschoolonline.com/

              Comment


                #8
                Ben Halliday Thanks i will keep this in mind.
                Jak Carver I just want the behavior i implemented to the enemies to work fo the client too, i'v started building this game with no thinking on multiplayer and probably made some mistakes with where implementing what ( Like Ben Halliday pointed ). But still, i don't really like to change stuff that are already working, if it will cause problems later i guess i will have to change it anyways.
                In this case i just want to see the animations of the enemies in both client and server.
                So this time i'v already solved the issue.
                ( I'v actually seen these videos of network replications, all but the two of "Adding Networked Features to 3rd Person Template". I just didn't feel like they matter that much, i guess i will just watch them anyways just in case.
                Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

                Comment

                Working...
                X