Ok, so in my 3D platformer, I have two main multiplayer gamemodes.
Gamemode 1. Players race through the level and collect pickups as they go. These pickups will dissapear for all players once collected by one player. This works!
Gamemode 2. Players race through the level and collect pickups as they go. These pickups will only dissapear for the player who collects it, but stays visable and collectable to all others. This does NOT work.
So my question is, how can I get the pickup to NOT replicate to other server or clients in the match when it gets picked up?
In theory, it should be as simple as turning off replication for the pickup, right? But this does not work, it still replicates reguardless.
I’m frying my brain trying to find a solution to this so any help or ideas are welcome!
Delay needed to make sure that game mode variable is updated.
I’m using destroy from game state because multicast does not work if actor is not replicated.
I’d change my approach.
You would still want the server to handle the pickup, so instead turning off replication, you could:
A) spawn pickups for each client on server, hide and disable collisions on clients that are not the “owners” of this pickup
B) spawn only one pickup, but have a replicated list of players, who picked up. On client, when that list changes, check if local player is in the list, if it is, hide the pickup.