Hey folks, I would like to confirm with someone that is in an advanced step in the course if the aura effect is also working for clients. I took a look into the code from github and just looking to the CPP files look like it wasn't fixed.
As far as I know, and I learned it in the multiplayer shooter course, overlaping should only happen in the server and for Aura, each potion has a overlap component configured directly in the BP.
My thougts about it is:
- The overlap works on the client (confirmed by drawing debug lines and print messages)
- Client calls "Apply effect"
- Communication does not work for the following reasons (I may be wrong here):
- Actor is not replicated
- Or server is blocking the attribute to be updated since it came from the client -> server and not the opposite (I think this is the reason)
The solution, at least what I can think, is something like:
- Only configure the overlap callback IF running as
Authority() - Store a replicated variable in the character to store the last replicated actor
- Do the action of consuming the potion in the server right away
- Do the action of consuming the potion when it get's replicated in the client
Is this correct? Does it make sense? I would like to know if it get fixed in further steps or if it's something we need to fix now.
I went until half of the course few months ago and I don't remember it getting fixed