Problem destroying actor in multiplayer on drop
I have it so that when I drop onto a slot, it should destroy the actor in the world and spawn a new actor in on the characters body, but calling destroy item (which is in the items blueprint) as a replicated event does not destroy the actor for any of the clients on a dedicated server.
asked Jun 19 '17 at 10:01 PM in Blueprint Scripting
Ok so I figured out at least one way to remedy this problem, if anyone was curious. I read that the playercontroller has to do the talking to the server so I did a 'run on server' event in my custom created player controller. The event in the player controller called the function in the BaseItem class to destroy the item. In the OnDrop section of my widget I called the event in PlayerControlelr by casting to it with getplayercontroller.
This method seems to work quite well with other things I needed to have replicated as well so it seems like a robust solution.
If anyone needs more info let me know.
answered Jun 21 '17 at 08:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here