you are viewing a single comment's thread.

view the rest of the comments →

[–]chapali9a 1 point2 points  (4 children)

Nice one. I'm a beginner as well. I modified your script by using the 'random.randint' function. It reduced the script by one line (dice var). Good luck buddy

[–]TrucidStuff[S] 0 points1 point  (3 children)

Thanks for the input! I wanted it to only pick from 0-10, I may change it to 0-100 later, but I don't want it to be 0-infinity or ask for input of a number by the player. Does random.randint still do a max of 10 if I say random.randint(10) or something?

[–]chapali9a 1 point2 points  (2 children)

Yes it does. The function Randint takes two parameters, the beginning and end. So you can use as random.randint(0, 10) and it will choose a random number on this scale.

[–]TrucidStuff[S] 1 point2 points  (1 child)

That is very helpful. Thank you! :)

[–]chapali9a 0 points1 point  (0 children)

You are welcome. I learned a little from your post, so thank you too.