Blueprint Light Randomized Color Temp

Hi first post here, super newbie question. Please advise if I’ve posted in the wrong subforum. Thanks!

I’m trying to create a blueprint with a randomized color temp within a specified range. So I’m using “Random Float in Range” in the construction graph which is working, however it seems to re-evaluate every time I move the blueprint instance or compile, etc.

I know I can build the same in the event graph and have it trigger on begin event play, but I want this color temp to be visible in the editor while I’m working, not just in play mode.

How can I create a unique randomized value within a specified range, potentially store that value or variable per blueprint instance, then apply it and have it remain that value unless I refresh some parameter to get a new seed.

Bonus would be if I can have that value/variable be something I can manually override as well.

Any help or ideas are greatly appreciated, thanks!

You’ll want to check whether your InitialColorTemp variable is already set (Since I have zero as the default value, simply comparing with zero works). If it isn’t, then you run your randomization logic. If it is, you set the temperature directly.

Note that this needs the InitialColorTemp variable to be exposed, otherwise Unreal will not save it between runs of the ConstructionScript.

Awesome thank you! I’ll try this out.