Random from 11111 to 5555
3absh
Member Posts: 601
I need a random number generator from 11111 to 55555 with any of these 5 numbers surpassing 5.
Comments
Hello!
I am sure there is an equation you could use. However, here is a simple solution.
Best,
Two.E
GSLearn.com | Templates | Free Demos | Udemy Course
Thx
Change attribute game.randomNumber to random(11111,55555)
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang
I don't think that was the question. Unless I am missing something, a simple random function won't work when you just want 5 random numbers that are between 1 and 5.
Best,
GSLearn.com | Templates | Free Demos | Udemy Course
@Two.E it's exactly what I wanted, thx
Yeah, it wasn't clear if it needed to be a 5-digit number or not. Using "number" in place of "digit" confused me.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
You can still use a simple random function. Kind of. In this example self.Number is an integer, not a string.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I don't think you know how useful that is for me
No way I would have found this in a forum search since I didn't know I needed this till now!!
Best,
GSLearn.com | Templates | Free Demos | Udemy Course
Glad to have helped! Often in GS you have to just try things and see if they work, as sometimes they do even when you wouldn't expect it!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support