First off I want to mention that I’m about to go nuts over this. Networking seems to be a topic that most people seem to avoid and even in Answerhub my questions are mostly ignored. This is not a case of “build my code for me”, I am genuinely baffled about how network works in UE4. And yes, I’ve seen all the tutorials and checked out all the content examples, read documents about it etc, but still there are a lot of questions that are never answered. (sorry for misleading topic, it’s three questions)
Maybe if you can help me find out how to get these two problems working, I can finally make sense of what is going on.
Calling a UMG function from a client
Here’s how I add the hud to each player. It works and all numbers show up for each player just fine. However, when I try and call a function within the UMG, it only works on the server. It seems to forget inbetween BPs that the player hud is actually set to anything, instead it shows me “current value = none”, but if that’s the case how do all the numbers show up correctly?
Having smooth crouching in multiplayer
The funcions itself work for both client and server. You can crouch just fine! Except that the camera position starts to jitter heavily when the client goes into crouch mode. It seems (again) that the variable of the camera vector is forgotten or somehow doesn’t work correctly in multiplayer. Maybe I haven’t set it up correctly. But since it doesn’t matter for the multiplayer, I just set it up locally. But even if I set it up so it replicates, it still jitters like crazy.
Turning Flashlight on and off
After having problems with the other multiplayer features, I thought this one might be simple. Just use a RepNotify, right? Well, kinda. But in this setup, the server works fine, but whatever the client does is not getting updated on the server. Even though the description of RepNotify says “Variables that are marked RepNotify, have a special function called automatically any time the value is changed, on both Network Authority and Remote Machines.” So why does the server not see any change if the client toggles his flashlight?
Sorry for rambling, but these issues are driving me crazy. Please if anyone whos what magic is necessary to get this working, please help me understand it.