Create weather with random integers
I created a weather system wich is intended to work this way : Every amount of time (here 5 for debugging purposes) the system cheks if it's raining or not. If not, a random integer is drawn. If this random int is greater than my "weather_change_cap" (=50) it starts to rain (and i'm playing the sound).
But it's not working. It is totally random : sometimes it's raining but the random int is 3, and sometimes it's not even if the random int is 78 (for example).
Could someone help me please ?
asked Feb 20 '18 at 11:29 PM in Blueprint Scripting
Having the Tick and then a Delay is not good practice - That means that each frame, you create a delay of 5 seconds then do something. Therefore, after 5 seconds, your blueprint will be continually running through the code after the delay.
Also, why not random between 0 and 1 and then use that as your 50/50 chance?
answered Feb 21 '18 at 09:52 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here