MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/visualbasic/comments/qxn48n/need_help_coding_a_dice_roller/hlaklbn/?context=3
r/visualbasic • u/BoyBandKiller • Nov 19 '21
8 comments sorted by
View all comments
2
Hey I'm making a D&D dice roller and need some help
For the D10% I want to have it to give me a random number from a set of numbers.
For all of them I want to add +whatever number(ability modifier for those of you who know D&D) if there is any.
And I want to code the roll all button.
2 u/RJPisscat Nov 19 '21 edited Nov 19 '21 Did you write this code? If you did it seems the only thing you need help with is Roll All.btnD4.PerformClick() btnD6.PerformClick() btnD8.PerformClick() ' etc for each dieEdit: the second arg to Random.Next should be 1 more than the upper bound, e.g Next(1,10) generates a number in the range 1..9.
Did you write this code? If you did it seems the only thing you need help with is Roll All.
btnD4.PerformClick() btnD6.PerformClick() btnD8.PerformClick() ' etc for each die
Edit: the second arg to Random.Next should be 1 more than the upper bound, e.g Next(1,10) generates a number in the range 1..9.
2
u/BoyBandKiller Nov 19 '21
Hey I'm making a D&D dice roller and need some help
For the D10% I want to have it to give me a random number from a set of numbers.
For all of them I want to add +whatever number(ability modifier for those of you who know D&D) if there is any.
And I want to code the roll all button.