Multiplayer fireplace

Hi,

I am quite new to multiplayer and I have a problem I can’t resolve.
I want characters to be able to start the fire when they have a lighter and put it down when they have water.
With my code both clients and server are able to put down the fire once they get water, but when they have a lighter clients start the fire only for themselves and server can start a fire for everyone.
When i remove the conditions (branches) can light up and can put down, everyone can start the fire and put it down and everyone sees it (but it doesn’t resolve this issue, cause then you don’t need a lighter or water).

I have no clue what I am doing wrong, I’ve tried replicating the variables, as well as passing the interactor to the fire function and getting variables HasWater? and IsLighterEquipped? from the function but nothing helped.

Thanks in advance for any help .


You don’t need to check the conditions on the multicast event, only on the client that interacts with the fireplace.

E.g. if the player has a lighter, he can start the fire. The server only needs to know if the fire was started or put out. Anything else can be checked on the client side.

2 Likes

Thank you very much!
Thanks to your reply I made a few adjustments that helped me get the result I wanted!