For some reason if i add this code to my HUD blueprint, launch a game with dedicated server, the clients start printing: Hello
Isn’t the Authority node supposed to cancel this???
Thanks for the help! it is confusing me very much because from the example files i understood that this should NOT happen!
print itself is replicated, it will print no matter where it’s getting called. however, you can still add something to your string to tell which side print the message. ie “server: hello”.
If i place this same piece of blueprint in a different blueprint i only see messages saying “Server: Hello” ONLY in the HUD Blueprint does the strange behavior occur in which it says clientX: Hello. ?? Is the HUD blueprint a special type of blueprint?
If i add this piece of code to the HUD blueprint and run on a server with connected clients to it, it starts to say Hello on all the clients, but the whole Yes message is never called, is it true that in the case of the HUD blueprint all have authority??
Well the HUD is locally run by the client if I remember right. Thats why Authority is always showing up on the clients. Cause the local client is the Authority of HUD.
That does make sense! So how would i call an Event to run on ALL Hud’s? I have an event that updates the objectives on the HUD, if I want to call that Event how would I call that from the server on all client’s HUD’s?
Thanks for the help!
The anwser is you wouldn’t… unless it is specific client code for the hud (e.g. hide hud widgets)
You should only use the HUD as a View on data, not logic itself. HUD only really needs one function, that is DrawHUD(). In this function check your variables and draw them accordingly, objectives should be just one of them.
So handle your objective on your Controller/GameMode or any other class and the problem should fix itself.
Thank you DennyR, that is how i shall do it now!