Random integer in range not working!?
So i have this weeeiiiird issue when packaging my game.
I have multiple camera actors in my menu containing a 'MenuCam' as tag. I get all actors by that tag and take a random out of that list and set it as the main camera (so overtime i start the game the view is never going to be the same). It works fine in the editor but when packaged it doesn't work properly. So I tried using streams, i get the current time seconds and create a stream of it and replaced the 'random integer in range' node to a 'random integer in range from stream' node. Works in the editor but when packaged it still isn't fixed!!!????
Started debugging, created a widget with a text containing the current time seconds i get for creating the stream by simply binding the text value to a string variable and setting the variable after creating the widget and my conclusion is that the time seconds is being baked in when i package somehow. So if i were to package on the 53th second of a minute the time second value will alllllllways be 53 when i start my packaged game (that's my closest guess but the point will still always be that the value is baked in and always will be the same when i start the game).
Can someone help me out please?
You need to pass in a DateTime to that node.
You want the node called "Now".
answered May 23 '18 at 01:01 PM
random is cool
answered May 23 '18 at 12:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here