i’m trying to make a item spawner based on a simple box. On begin play the Item Spawner will chose a random vector multiple times using the node random point in bounding box, the problem is the random vector is diferent for each client, even if the code is replicated from the server to client.
Hi! You can try to run the code that generates random value only on server (using condition with Authority), and after set property and then replicate it to clients.
Hello, thanks for the reply.
By doing that only the server instance will have the random value ( even replicating the value using multicast ), and the client will have the vector set to 0 0 0.
Hi! I made some example for this case, you can look at it Replication.7z — Yandex.Disk
I couldn’t open the project, it fails to compile the project module.
It easily builds on my machine. Try to open with Unreal as Administrator if you are using Win. Also I am working on 4.23, not 4.25. Anyway, look at C++ in this folder
Replication\Source\MyProject\MyActor.h and
Replication\Source\MyProject\MyActor.cpp
In fact I dont know how to make it in blueprints, but in C++ it is rather simple.