I am making a network game and whenever I check my variables with a print string I get a full negative but only a semi positive return.
How can a boolean return Clinent 1 True, Client 1 False and so on? Also, why is everything twice? In the same frame the Server is also true and also false? I am asking because I think I am running into some bugs in my mechanics because of this. Please help!
Yes, the Server is also a Client. Not sure I understand how this results in mixed results though. If something is set to 1 and the Server says it’s 1 then how come next frame the Server says it’s 0 without anything running?
It’s the client reporting how it sees itself and how it sees the server, then how the server sees itself and how it sees the client. Because your actor is instanced for either player, you are printing on 2 actors on 2 systems (client and server) and not updating the bool across the server.
I managed to make it work by changing the way I spawn my players. Now the Server is also listed as Client. Before he was only THE Server. I also had some networking mistakes.
My recent issue is one I am struggling from the start and is about displaying player stats on the HUD separate for the Vampire than for the Villagers. I cannot make it work in the player controller (as I understand I should) because I do not know how to see what character is the Client controlling. Before I had a IS SERVER function that worked because the Vampire was Server and not also Client. But now, when everyone is Client I cannot make a difference between them.
I have searched the internet but I cannot get something specific on this simple issue. There is something I am overlooking.
BTW, I spawn my players from the game mode, but spawning widgets doesn’t work there for some reason.