Replication issues Please Help

Ok so, let me start by saying all players are spawned in with the same player character BP. I only made one character for everyone to use. Now my problems started with not being able to get the same item to spawn in each players world in the same place. Ive tried running it on server first but ive no idea how to set the number the same for clients so they spawn the items. This is my Coding In my Level BP to spawn items.

So I said screw it and let all players worlds spawn their own items in own locations so everyones world will be different. I dont want it that way but couldnt figure it out. But now Im trying to figure out how to make it to where I can keep track of if players are in range of an item in the world to interact with it. I cant set it to where only the person overlapping it is set. Instead itll set it for multiple if the same item spawned in the same place on each players world. Ill show pics as example and my coding.

This is the coding in player BP

This is coding in the knife Item

This is the issue, since a knife spawned in the same spot as all three players, then if only one of them overlaps it, it sets the actors in range to all of them, i only want it to register for that player themselves and not anyone else.

This has been bothering me and holding me back from continuing in my game making process for 4 days straight, im going insane trying to figure this out and i need help badly please.

Hi, your logic seems overly complicated to me (I also can’t see where the prints from your last image are coming from, ListActorsInRange is a RunOnServer event, so the print from the clients isn’t coming from that).

I suggest you first decide whether or not you want your items to be in sync between clients, so if one clients interacts with an item, should all other clients know about this or not. If the other clients should know about this, then make the items replicated and handle everything relevant server side (spawning, interaction, etc. all server side only), no need for multicasts. If the player hits the interact input, then you send that to the server and handle all the interaction with the item server side. Then if you want to display some cosmetic effects like particle systems, animation, sound, etc. on all clients, you can use one multicast from the server to do so.

If your items are not game relevant (server and other clients don’t need to know anything about what one client does with an item), then don’t make the item replicated and handle everything on that one client.


Also instead of keeping an array of players in the item, better keep an array of items that the player can interact with, since the interaction input will come from the player not from the item.

Ive tried running it on server first
but ive no idea how to set the number
the same for clients so they spawn the
items

If your item is set to replicate, you only spawn it on the server, it will be replicated to all clients automatically.

I figured it out, it was the actor not set to replicated. once i did that its all good now, thank you