* I actually have more than 2 balls, but just for illustration, I’m setting a simple IF/Else.
Every time the game starts, it will always start with blue; even if you retry playing again or if you restart simulator or device. [import]uid: 7856 topic_id: 4648 reply_id: 304648[/import]
Did you use randomseed() to mix up the numbers returned? Typically you pass the time in as the seed in order to always get a different sequence of numbers. [import]uid: 12108 topic_id: 4648 reply_id: 14693[/import]
I have used randomseed and I’m not convinced about the randomness of it. Something that’s supposed to be 50/50 is more like 70/30 after a lot of testing. [import]uid: 10835 topic_id: 4648 reply_id: 14733[/import]
The interesting thing on my random, is that the object always appears on the same X
Not sure, but I really need to be able to make this random…random
I’m planning on displaying a different message every time a game ends and by the looks of it, it will always be the same message [import]uid: 7856 topic_id: 4648 reply_id: 14765[/import]
I have different messages every time my game ends and that works well enough. However I have 2 gameover screens that are supposed to be shown 50/50, yet it’s not really so.
So I’d also love a more random, random function.
Oh yeah, there’s a bug on math.random where the first call will always return the same number. So call it first at the beginning of your code and THEN start to use it. [import]uid: 10835 topic_id: 4648 reply_id: 14767[/import]