I’m currently trying to develop a new game which depends heavily on RNG for certain functions. Although you can apply the generate random number to objects, I cant apply those random numbers to variables. If you could put an option under the “set variable” tab in events to set the variable equal to the random number generated by an object, that would be greatly appreciated.
This is some quick code i made to have a variable set to a random number.
The variable (Choice) cycles through 0 to 9 in a loop until the circle is tapped.
Hiding the variables value while it cycles would make it random, so the user won’t know it’s value.
You could use the random number generator to stop the variable cycling instead of the circle being tapped.
I’m sure a more efficient way of coding this is possible. (or just wait for the new update coming)
The next version of Ready in final testing has a new “generate random” setting in the Global Variable inspector window. You set the variable type (position, angle, integer) and then toggle Random ON/OFF to manifest the random generation. There is one last bug to resolve and then it will be submitted to the App Stores and released… could be today … or tomorrow. This will remove the need for long Event Manager actions to get this random result.
The new version is live on PC and Android with random global variables. macOS and iOS are waiting for review - so live in next 48 hours usually. Have at it!