I’m wondering if there’s a way to set up for an event node to fire to one of 3 boolean setter nodes based on probability. This is for a very basic weather system I’m working on, where control parameters for things like cloud color/opacity, sky color, sun intensity/color, etc, are controlled via timelines for proper scaling based on the time of day, but they’ll be activated by an event node that will fire when the timelines finish. I want to set it up to where if it’s finishing up one particular weather cycle, there’s a certain percent chance that it’ll fire to that same one again, or that it’ll fire to a different one and play through that cycle, which will activate the timelines in a particular, "weather pattern profile (see Sunny profile example below, right now all timelines are set to play automatically, though I have runtime controls to speed them up or reverse them for debugging/parameter setup) though I don’t know how to do this.
Okay, I think I’m on the right track here, but I’m wondering, the random float in range node, is there a way to control how often it generates a new number, or does it even generate more than one at all?
Each frame that you access the random float in range, it has a new random. If you want to have two seperate randoms in 1 frame, you’ll need to have two random nodes.
Awesome, so say I set a branch node to check for a float in range condition, and the value of that float in range is pulled from a random float in range node, it’ll generate a different random each time that branch is called on?
Like this?
Nevermind, yes it does, though I had to set it up a bit differently. It works, though. Each cycle has a 1 in 3 chance of starting after a key press, I just tested it by having it print the weather cycle name on the screen.
http://fat.gfycat.com/SmallTallCavy.gif
I’ll set it up a little differently for the actual weather cycle though, essentially each profile will have it’s own custom event that fires at the end of all the timelines, and that’ll serve to tell the cycler which weather profile was just played. That same weather profile will have a 2/3 chance to play again, so that it’s not changing cycles every time, but still has a chance to change. Here’s how the test cycler looks (1 in 3 chance overall from keypress)
Thanks for the help! This is resolved