Creating Probabilities

TheHooglerTheHoogler Member Posts: 102
edited November -1 in Working with GS (Mac)
Hello!

I'm planning a couple of games where probabilities might come into play. Say you're making Oregon Trail, and you want at any given time for there to be a 5% chance for game.attribute "dysentery" to be true, otherwise false (on a timer or whatnot). Or as another example, you're making an RPG, and you want to create a "chance to miss" with every enemy attack. Would I have to create a game attribute using random(0,100), then change dysentery to true if game attribute < 5?

I've tried looking in the forums for this, and haven't found anything. I'm not really sure what the most efficient way of doing this would be. Thanks!

Comments

Sign In or Register to comment.