Skip to content

SeinARTS Random Library

Class · USeinRandomBPFL : UBlueprintFunctionLibrary

#include "Lib/SeinRandomBPFL.h"

deterministic: safe in simulation code

Blueprint nodes that draw from the match’s shared deterministic random stream. Use them in abilities and other simulation logic instead of Unreal’s random nodes. Outside the simulation they log an error and return a default value.

True or false with 50/50 probability.

static bool SeinRandomBool(const UObject* WorldContextObject);

Returns true with the given probability, a value from 0 to 1. A probability of 0 or less always returns false and 1 or more always returns true, without advancing the random stream. Use it for accuracy rolls and weighted coin flips.

static bool SeinRandomBoolWithProbability(const UObject* WorldContextObject, FFixedPoint Probability);

A uniform fixed-point value from 0 up to but not including 1.

static FFixedPoint SeinRandomFixedPoint(const UObject* WorldContextObject);

A uniform fixed-point value from Min up to but not including Max. If Min is not below Max it returns Min without advancing the random stream.

static FFixedPoint SeinRandomFixedPointRange(const UObject* WorldContextObject, FFixedPoint Min, FFixedPoint Max);

Uniform integer in [Min, Max] (inclusive). If Min >= Max, returns Min and does not advance the PRNG.

static int32 SeinRandomIntRange(const UObject* WorldContextObject, int32 Min, int32 Max);