Download

Where to handle certain things in multiplier, such as NPC Spawning, Items on floor appearing/disap

disappearing…

I’m having trouble figuring out where exactly I should handle this stuff.

For example, if I look at an item to pick it up and place it in my inventory, I would also want to destroy it. So, I thought why not handle the deletion in the actor itself… However, I know now only client can communicate with the server. So, how do I handle this?

Where do I handle things such as thing in general? Who tells an NPC where to spawn/move/attack/whatever if the NPC can’t communicate with the server?

Is there a way to set the server as the “owner” of these actors?

I haven’t played with networking yet, so I could be wrong, but if what I interpret from the docs is right, it should be pretty close. Like regular players, an AI will have a controller, but this controllet isn’t a player controller, it is an AI controller. Player controllers only exist on the client if the client has a player controller (can’t see why they wouldn’t in a networked game but who knows). ALL player controllers exist on the server, so most likely the AI controller exists on the server. Since pawns are automatically replicated, the clients don’t really need the controller to see that the NPC is moving.

Thanks for the reply

The server doesn’t seem to own the pawns I have placed on my level, which means they can’t ask the server to execute commands. So, if one gets killed… Who tells it to die, to drop loot, to disappear, etc… I could of course have the player who killed it do all that, but there has to be a way to handle server-side events inside of actors not owned by the clients

That seems like addressing a symptom and not the problem. Try taking a look at the shooter game. It may be in C++ , but that shouldn’t stop you from checking their settings and reading the code to get a general idea. Also did you read up on replicated custom events?