Charas-Project

Game Creation => Requests => RPG Maker Programming => Topic started by: Starduster on August 05, 2005, 11:51:46 PM

Title: Randomizing
Post by: Starduster on August 05, 2005, 11:51:46 PM
This may sound a bit noobish but please bare with me. I'm looking to figure out how to randomize stuff, such as fishing, how would I make it so there is an equal chance of getting three different kinds of fish we you begin fishing and a good chance you won't catch anything?
Title:
Post by: WarxePB on August 06, 2005, 12:04:01 AM
Random number variables, my friend. And a bit of math.

In your fishing event, create a Variable Operation that generates a random number (We'll say 1 to 8). This can be achieved by clicking (in the Vasr Operation box) the fourth option, which should say something about random numbers. Enter the two digits into the boxes (order doesn't matter).

Now, create 3 Conditional Branches that check what the random number variable is. If it's 1, put code in for catching 1 type of fish. In the Else handler, put another one that checks if the var is 2, and put the code for catching fish 2 in. Do the same with 3. In the else handler of 3, put a message saying "You couldn't catch anything".
Title:
Post by: Starduster on August 06, 2005, 03:25:53 PM
Okay I get it now I was thinking the random variables that you needed to input were a whole different thing from the normal variables, but i got it now.