I seem to have ran into a replication problem, I’ve attached the pictures of the blue prints but i’ll explain a little first;
I am trying to get a multiplayer game working using the steam online sub system, The server side can do everything (obviously) where as the client side can not. What I can’t figure out is why the event dispatcher, “Pickup item” isn’t being called on the client. More than likely, I assumed wrong in thinking that calling it via a replicated custom event would be enough for it to be replicated.
To make sure what was being called and what wasn’t I have added breakpoints, the code works on the client side untill it gets to the “CallPickUpItem” node, Just after the pickupitemevent I added a breakpoint to the branch node and I found out that it is working on the server but isn’t working on the client, how come? anybody got any ideas?
Cheers…
Your event is set to “execute on server”. That means only on server. If you want that entire event to be called on clients, use “multicast” instead, or put call pickupitem node in another event which is multicasted, and call that event instead of the dispatcher in the first one. From the looks of it you should do the latter, as interaction trace looks like server only logic.
Multicast events, when called on the server, will get executed on all clients. Execute on server events are called by clients who need to tell the server something, and the event runs on the server.
I have “tried” to my best understanding what you talked about, even using multicast, the node “Call PickupItem” is never actually called, so still the issue is persisting.
I don’t like to bump but as i’m still stuck and would like some help, I don’t want to start a new thread, I am still stuck on this issue, I can not get the event dispatcher to call on the client? Is there a work around?
Nope, there are numerous threads asking the same thing, it clearly states in the documentation that this should be possible but there’s nothing to say how.
Create Event Dispatcher in (for example) ThirdPersonCharacter Blueprint. Compile
Go to another blupeprint (which will communicate with TPC blueprint, let’s call it XXX) and in there you search for “Assing [ED name]”. Connect it properly to Cast to TPC node as standard tutorials show. Compile
Come back to TPC BP. Search for node in Class → XXX → [ED name]. Node should pop up. It should be WITHOUT envelope! Remember also to create and connect proper replicabable variable referencing XXX blueprint.
In TPC create Custom Event with Run on Server Replication mode. Obviously create some node which will call this event. Compile
Enjoy!