Download

Does Unreal have a networkable shared random seed?

I’ve been looking through the documentation at UnrealEngines use of Randoms

The only thing I could find was

This seems to be around using a re-producable random, which is the sort of thing I’m after, but doesn’t deal with 1) Using it in C++ and 2) Sending it across the network

My goal is to assign a random seed to my weapon, and then replicate that to all clients.
The clients and server then use the seed for all randomization (mainly worried about the spread of weapon traces).

This should mean that everyone gets the same value when firing, and you don’t need to send the impact location like UT did. I dont want to follow the UT approach because I want to do around 50 randomized traces, which would mean 50 impact effects going across the network.

So, to the question…
Does UnrealEngine have a Random Seed that can be set, or do I need to use the RandomStreams (and if so how do you reference a blueprint via code)?

The C++ class for it is FRandomStream it is like a structure check it out.

You can create a variable like
FRandomStream RandomStream;

Perfect. Cheers :smiley: