Unreal Engine 4 Tutorial - Online Multiplayer Part 6: Montages
ฝัง
- เผยแพร่เมื่อ 23 ธ.ค. 2024
- In this series we will be explaining how to add online multiplayer to your games. First we are going to explain how it works, then we will go into creating lobbies etc.
In Part 6 we go through how to replicate animation montages; adding a shooting animation to our shoot input for our clients and server.
SUPPORT ME
Patreon I / ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ryanlaley
PRIVATE 1-2-1 SESSIONS
Email me at support@ryanlaley.com for more information and rates, or visit www.ryanlaley.c...
JOIN THE COMMUNITY
Discord I / discord
FOLLOW ME
Twitter I / ryanlaley
Facebook I / ryanlaleygames
Instagram I / ryanlaleygames
Note that in a multiplayer shooter, you should first play the fire animation locally, and then tell the server to run a multicast so all the other clients will see it. This is to reduce the lag. If you would wait until you would receive the multicast back from the server to play the animation, there would be a 20-50 ms delay depending on your ping which you dont want. The same goes for shooting projectiles etc. However, the hitting of projectiles should then ofcourse be done on the server
This series is popping off right now, prob one of your quickest/highest viewed yet! Please continue this good sir, multiplayer on unreal is very confusing to plebs like myself
Damn im learning about animation and replication at the same time, nice :)
You are a godsent man to thousands of us trying to learn ue4
Appreciate these replicated tutorials!
I had no idea this was a new series, and you're helping me understand unreal networking. Thanks a ton!
if i follow this tutorial series, does this explain how to connect people around the world or only localy
??
@@grid4892 It’s a little bit of both.
@@drephuz oh damn, i rly need a tutorial series on networking on how to connect users around the world into a lobby but ive been struggling for weeks going from unity mirror and custom solutions to back to ue4 but i just cant
According to the end of this video (11:45), you are doing the same branch logic after the InputAction and the MC_Event.
Would not the caller of the RPC_Event also receive a MC_Event back from the server? Meaning that PlayAnimMontage technically is called twise for the caller here.
If that is so, this would be something you would have to be careful about if the target function is sensitive to how many calls it gets. (For example a counter)
thats what I realized as well (event commented before I saw your comment), he does same thing with one or two things in earlier videos
yes, I was just about to write the same comment when I saw yours. I think we need to just call the RPC and nothing else on the client. However, that will confuses the server and make everyone shoot. So, we also need to pass on which character is supposed to shoot by passing self to the RPC and the RPC then call MC passing along the character reference, I think that's a beginning of a more accurate solution.
@@RaedAbbas Yeah, I preffer passing along information about the source of the event for several messaging mechanics.
Interactions or Abilities are some good examples of where this can be super useful. But it makes a lot of sense for networking too.
very grateful for your videos, it's a great bank of knowledge for us to begin and learn Game dev
i can't find content to go from beginner to intermidiaire, you're content bring a lot
could you make very advance video
note ; you already do a lot, we are all very happy with all the work you're doing, don't over work the thing
Dude just found your series, much love and appreciation for educating aspiring game devs. 🙏🏾🙏🏾🙏🏾
Welcome aboard!
Awesome series, well explained. Just a thought, in a lot of videos you use branches in places where select works the same, just thinking it could be good the get people use to using them in places like the PlayMontage.
Awesome video, thank you for all your videos they help us all a lot :)
I should have watched your tutorials instead of garbage tutorial i got on youtube, that only explained how to do it with RPC Server -> RPC Multicast. Because of that, i learned the bad technicle of doing RPC everywhere lol.. i ended up with a game, extremly buggy.
Your tutorials are quality!
cant wait for more multiplayer tutorials
making a reload - working all fine - however animation is playing on server when client reloads
Does this work with the shooter series?
I didn''t understand why you need to play the anim montage again after calling the RPC ShootGun event, I tried just with the RPC and it works fine
Hey for some reason when I shoot while crouching my characters top half body snaps upward or at an angle. Does anyone know how to fix this? Or what the problem is? Thanks,
I also have an upper body mounting error when I select the upper body in
the video part located on the upper right side, the video does not play
and does not play the animation.everything is correct, but the
installation is problematic
When I aim all three characters in that window start aiming. Neither of the other windows see anybody aiming...
I found that when I click play all three windows are named [Netmode: server]. Is that why this is happening? even when I switch play mode to all client it changes nothing...
I have rewatched the videos multiple times but I cannot fix the issue! PLEASE HELP!
The shooting montage works though! it only plays on one character and the correct character.
Why use "play anim montage" instead of "play montage" in character blueprint?
waut un 2.26 where can you get the anim slot mager?
If it doesn't show for you by default you can show it via the Windows menu at the top
@@RyanLaley ok thank you very much
Hey, everything works fine. but when I crouch shoot the animation snaps and aims in a weird way. Moving left and right also seems to "vibrate" the ak. But moving forward or backwards is fine with no glitching.
Make sure your ak has no collision
I had the exact same problem of vibrating animations on the Blend Space animations when moving any direction other than forwards. I came across the solution completely by accident. In the character movement component for your third person character, uncheck the "Orient Rotation to Movement" property (under Character Movement Rotation) and, voila, buttery smooth strafing and walking backwards!
Hey I have the same problem where when I shoot when crouched my character snaps at an angle, did you find how to fix this?
@@RyanLaley hey my gun has no collisions but it’s only when I crouch and shoot my character turns the gun at an angle. How could I fix this?
Is the part of the tutorial on how to make it actually online and not local still in the making or is it not going to come at all?
Yes still in the making
@@RyanLaley ok, thx
The problem I'm having is just that the CLIENT can't see the SERVER attack. Why is this?
What if I have a combination attack that works off of a switch on int node? I can only get the first animation to play.
Put the rpc call after the switch for each output of the switch
I don't understand why are you adding additional PlayAnimMontages nodes after InputAction Shoot event, it is called on multicast anyway so it is not necessary or I'm missing something
You want the client to play their animation on input. This makes it not affected by network connection stuff.
The multicast tells all the other clients that they should also play the animation on that pawn.
@@RyanLaley Yeah but if I understand correctly it is first called locally and then it is overridden by the multicast
Hey Ryan, when you get the chance; will you be up to show us how to make teleporter doors? Not like portals; but a door you'd go up to, press E on, and it'd take you to a different spot in the same level.
Search my channel for teleporters and that will solve most of it for you