Some questions about Server and Client

Good day guys, when i play with dedicated server

i will get “i am client, i dont do anything” instead of “i am server, i do something” and then set the character’s health

so how can i make the server set the health?

Input events are only triggered on the client.

setting the health over an direct key input is not hacksave at all. So what exactly are you trying to do ?


the ServerSetHealth event is a custom event with “Replicate to Server”
and the health variable is also replicated

As said Input Events only go via the Client. You can make a Input Event E and go into a Custom Event which is set to “Run on Server”. And from there another Custom Event which is set to a Multicast. From there you can use the “Switch has Authority” node and everything should work just fine.

i was trying to do a cross blueprint initialization which means take the value from blueprint1 and initialize the value in blueprint2, and i failed.

After that i found another way to do that, but my mind have no longer being so clear about the concept of custom event with “running on server”

thx for your reply and also Nobody :slight_smile: :slight_smile: