I’m currently trying to implement a small class system, which basically just defines the default startup items for a specific character.
I’ve created an Enumeration to define the different classes (atm Doc & Technician) and put a Key-Input into my Pawn’s class waiting for the player to press “1” or “2”. Upon that event a Custom Event is called, which then executes a “Change Class” function. This sets a new material depending on the enumeration value, which was given to it. The player initially starts with a default class which just uses the standard blue material.
At the moment my Custom Event is set to be a “Multicast” event, but I’m encountering some issues with it.
When changing classes on my server-side window the Mesh updates its Material on both server- and client-window (orange mesh), so basically the client sees, that the server has changed its material.
If I want to change the class on my client-window however the material is only updated on the client-window, so the server does not see a change (green/blue mmsh).
(see picture one)
When changing the Custom Event to “Run On Server” the behaviour is even weirder. It just updates on the server-window, it doesn’t care if I want to change the Server’s or the Client’s mesh. The client-window does not show any changes, whereas the server-window changes both upon request. (picture 2)
I also tried setting up an Authority guard just before the Event is called in “OnRep_Class”, when the Custom Event is a “Multicast”, but then I can’t change my mesh on my client at all. It doesn’t even get into the Event. Server-side working good, though, which does makes sense I guess. (see picture 3)
I’m attaching my blueprints since I can’t see the error so far. Hopefully someone can see the issue here and tell me what I’m missing.
Thank you very much in advance
P.S.: How can I set the “RESOLVED”-flag, for another post I’ve made?
"Multicast" (Server sees only Server changes, Client sees both changes)
"Run On Server" (Server sees both changes, Client sees no changes at all)
Adding “Switch has Authority”-Guard right before “Change Class Event” in "OnRep_Class"