Game Maker Tutorial: Dice rolling

Game Maker Tutorial: Dice rolling


Hello everybody this is Doug from the Gamer’s With Glasses, back here in mine- excuse me this is Game Maker not minecraft. So in the last tutorial I showed you how to debug the code and i wanted to show you how to make a dice with if statements and this is the main thing this is going to be for as if you want to kind of have like a treasure chest and you want to have like a hundred different items you’re going to roll the dice for a hundred sides and it’s gonna choose whatever if statement you have and it’s going to give the point of the item so most so what I learned this does not work and this is what a lot of people have basically says random gonna have four sides and it’s going to get +1 k00 it’s still going to be 1 so this is going to be outputting and then if you have if statements it’s gonna be badass nothing’s gonna happen basically so let’s a show you what I mean real quick you can see in the last tutorial but case you’re just watching this one as you can see nothing happens when he’s supposed to be moving and this is because right here as you can see it’s showing decimal points is not showing exactly variables so it’s fine if you want to roll like one or two sides and you want to have it if it’s greater than three then it’ll do a thing and that’s fine but if you want to have it lists a bunch of items and be equal to something then you’re gonna have a problem is not going to do anything so what we want to do you want to change this random thing basically and we’re just going to add a really simple thing we’re going to have floor and that all it’s saying now instead of what it was saying for is it saying round down round down no matter what round down to what you got so was running again i’ll show you what i mean and it will actually start moving all around the screen and shit so let’s say and anything you want to pay attention to is right there so as you can see it’s outputting different it’s not putting out outputting decimals anymore so it’s just outputting one thing so like I said you can use this if you want to have like an item give it to an I don’t you want to make a like i’m using in this in this game right now in my class to spawn things eventually basically it’s gonna if it equals one that’s gonna smoke something equals 2 transpose analysis blah blah blah you know you can also use it for chest items inventory you can main thing you also want to use it for superior making a fighting game you can if it if it rolls on one then it’s going to do one damage if it’s also too it’s going to 23 you know blah blah blah however much you want to do so thanks for watching everybody this has been dug from the games with classes make sure you want you subscribe and like this video if you in fact like this video and if you want to see more tutorials i can always bring you more but remember i’m not an expert at this this is actually all from my teacher in the classroom taking on this subject right now so i have to thank him so thanks for watching everybody have a good day bye

Top 10 Controversial Moments In Teen Titans – Part 2

Top 10 Controversial Moments In Teen Titans – Part 2

Hormones, drama, and poor choices. Those three things pretty much sum ups a lot of teenagers, but it also sumsRead More Top 10 Controversial Moments In Teen Titans – Part 2

2 Replies to “Game Maker Tutorial: Dice rolling”

  1. if you need an integer between let's say 1 and 6, the code for it is :
    irandom_range(1,6);

    i suggest using coding in GML instead of drag and drop actions.

Leave a Reply

Your email address will not be published. Required fields are marked *