Announcement

Collapse
No announcement yet.

Character Wont Sprint in MultiPlayer

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

    Character Wont Sprint in MultiPlayer

    Hi Guys hope you can help.

    So I'm still new in UE. I'm trying to create simple MultiPlayer bit. Basically I got set as two clients in UE Editor.

    When I play it as Single Player my character can sprint with no problem.
    But when I have both windows up and two characters. None of them will sprint.

    I have set in the character_BP to replicate " Both Boxes Ticked"
    Then I have simple Running - LShift - Set Max Walk Speed - From Char Movement and when release set on different speed and I got it working with Stamina Reduction. (All from Tuts on youtube)

    I wonder what I have missed, what else I need to replicate.

    I don't know what screens I should have provide, so if you need to know something let me know.

    Thanks

    Jiri

    #2
    Any ideas guys? It's the Client that has problem.. Thanks again

    Comment


      #3
      A screen of your character blueprint would help, of the blueprints involved in sprinting.

      I'm running into a similar problem with an input action not working clientside. If you're getting a player controller to adjust max walk speed, then your problem may lie in the fact that you're only calling a player 0 instead of the other two. Unfortunately I'm not sure how to specify which character is inputing 'sprint'

      Comment


        #4
        I'm still learning about replication so bare with me a bit, but what I'd try to do is create a custom event that accepts an input for the walk speed and set it to multicast. Then wherever you are setting the run speed tell it to instead call that event and pass in the speed and have the event trigger the change. You may need to pass in the playercontroller you are changing instead of the speed. I haven't tried to do this yet but from what I understand that's how it would work.

        Comment


          #5
          Firstly, I would NOT recommend to someone new to game development to work on a multiplayer game.

          Since you've started working on MP anyways, making characters sprint (or do most movement functions for that matter) isn't too hard, if you have a deep understanding of replication.

          Essentially what you want to do is:
          - on the client do whatever you do to start sprinting (i.e. press sprint button to begin sprinting, run your checks to see if player can sprint, etc.) none of this needs to be replicated...
          - after the first part of your chain of nodes, you will probably want to activate a sprinting animation for the player, and increase the movement speed; THIS is what you want to replicate. To do this, create a custom function (i.e. On Sprint Server) and set this custom function to "Run On Server". Have this custom event fire off another custom event (i.e. On Sprint Multicast) and set this new custom event to "Multicast", this way all clients/players will see you sprinting around the game

          Sorry for not posting screen shots, I would, but I can't post any work I'm doing from my studio (doing so means my career in the games industry is over).

          Again, multiplayer gameplay programming is very advanced, there are engineers whose careers are based just on doing this all day for a living. Just keep trying and go over exmaples content from Epic, look at the videos on network gameplay from Billy Bramer, etc.

          Good luck!
          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


            #6
            Originally posted by Jak Carver View Post
            Firstly, I would NOT recommend to someone new to game development to work on a multiplayer game.

            Since you've started working on MP anyways, making characters sprint (or do most movement functions for that matter) isn't too hard, if you have a deep understanding of replication.

            Essentially what you want to do is:
            - on the client do whatever you do to start sprinting (i.e. press sprint button to begin sprinting, run your checks to see if player can sprint, etc.) none of this needs to be replicated...
            - after the first part of your chain of nodes, you will probably want to activate a sprinting animation for the player, and increase the movement speed; THIS is what you want to replicate. To do this, create a custom function (i.e. On Sprint Server) and set this custom function to "Run On Server". Have this custom event fire off another custom event (i.e. On Sprint Multicast) and set this new custom event to "Multicast", this way all clients/players will see you sprinting around the game

            Sorry for not posting screen shots, I would, but I can't post any work I'm doing from my studio (doing so means my career in the games industry is over).

            Again, multiplayer gameplay programming is very advanced, there are engineers whose careers are based just on doing this all day for a living. Just keep trying and go over exmaples content from Epic, look at the videos on network gameplay from Billy Bramer, etc.

            Good luck!

            helpful, thanks.
            Snap-In Systems: <<< CLICK
            | Inventory (Battle Royale) |Smart Select Box | Ready Game Modes | Handy Macros | Gun Weapon System |Simple Mesh Outliner |

            Comment

            Working...
            X