Started by
Nanobott
on
Topic category: Help with MCreator software
So i am working on a Black Jack mod, ive got everything working except the cards pulling are random integer, so chances of hitting blackjack, or sidebets are way lower.
Is there any way i can somehow use a different chance? the one blackjack uses for a 52 card deck? Or is this already the case and am i just realy unlucky when testing?
(average 100+ bets)
Change your chance to test if it's working.
What do you mean?
Get a random number between 0 and 99 (use the "included" type) and check if it's lower than the percent chance you want.
E.g.
[if [[Random integer between [0] and [99] included] < [50]] do]
|(Interesting things)
[ ]
Or something like that.
So if it for example returns 45 and i want it to be 50% it will not draw that card?
So then i could make 4 suits; Spades, Hearts, Diamonds, and Clubs. And it whould beL
[if [[Random integer between [0] and [99] included] < [25]] do] Spades
[if [[Random integer between [0] and [99] included] > [25 and < 51 do]] do] Hearts
blablabla] do Diamonds
blablabla] do Clubs
and after that i could set a chance of 13(there are 13 cards in 1 suit) to be 2-11(ace)
Do you think this will work or is there something stupid happening here lol
*processing data with acoustic device*
I don't understand. Are you saying that for each 25% there's a card? For that you could just use a 1 to 4 and assign a card to each of those values.
Also, I don't know Blackjack.
haha, there is a 25% chance of the card being hearths, spades, diamonds or clubs and a 1-13 chance for an Ace, 2, 3, 4, 5, 6 , 7, 8, 9, Q, J, K.
Oh!
https://imgur.com/a/Hs1kNCD
That's pretty much it.
yeaa got it, thanks ! It a lot more code when you want ace to behaviour as 1/11 and the text change to that lol, but i think im getting there and my brain understanding this makes it a whole lot easier hahah
Yay!