Download

Random float in Range into Make Colour?

Hey Guys,

So I’ve built a blueprint asset for my environment I’m working on at the minute using the spline mesh component and attached actors (Christmas lights). I originally created this in mind with having the colours of each light on the splines change each time the BP is compiled, lighting is built or when the scene is played.

However, now that I have enabled Emissive Lighting from Static Meshes on for the lights, I’m getting the issue where the baked static light colour (for instance a Red) would be different to the current light colour (as it’s all randomised).

Is there a way I can take the nodes I have in the picture (to create a random range of colours) but then have it fix and stay the same and NOT update every compile etc.?

b62749b1a5202b22483e7229e209f2ce3906ea3a.png

Use a Random Float in Range from Stream. You will have to create a stream variable to hold stream seed. This way your game will the same color lights as you see in the editor. You will be able to change the randomness by changing the stream seed.
Here is the reference: Random Streams | Unreal Engine Documentation