This tutorial will allow you to create a Rock/Paper/Scissors minigame. This should work in all the RPGMakers, but I will set this up for RM2K3 because I know it works there.First, make a variable and call it "Opponent Choice". We are going to assume that:
1 = Rock
2 = Paper
3 = Scissors
The basic idea is to set the "Opponent Choice" variable to a random number and then check it against the choice the player makes. To do that, we set up the event like this:
Variable [xxxx: Opponent Choice], Set Random (1-3)
Show Message: "What do you want to choose?"
Show Choice: "Rock", "Paper", "Scissors"
If Choice = "Rock" Then:
If Variable [xxxx:Opponent Choice] = 1 Then
Show Message "You chose Rock! The opponent chose Rock! The game is a tie!"
<Whatever happens if you tie>
End
If Variable [xxxx:Opponent Choice] = 2 Then
Show Message "You chose Rock! The opponent chose Paper! You lost the game!"
<Whatever happens if you lost>
End
If Variable [xxxx:Opponent Choice] = 3 Then
Show Message "You chose Rock! The opponent chose Scissors! You won the game!"
<Whatever happens if you win>
End
End
If Choice = "Paper" Then:
If Variable [xxxx:Opponent Choice] = 1 Then
Show Message "You chose Paper! The opponent chose Rock! You won the game!"
<Whatever happens if you win>
End
If Variable [xxxx:Opponent Choice] = 2 Then
Show Message "You chose Paper! The opponent chose Paper! The game is a tie!"
<Whatever happens if you tie>
End
If Variable [xxxx:Opponent Choice] = 3 Then
Show Message "You chose Paper! The opponent chose Scissors! You lost the game!"
<Whatever happens if you lost>
End
End
If Choice = "Scissors" Then:
If Variable [xxxx:Opponent Choice] = 1 Then
Show Message "You chose Scissors! The opponent chose Rock! You lost the game!"
<Whatever happens if you lost>
End
If Variable [xxxx:Opponent Choice] = 2 Then
Show Message "You chose Scissors! The opponent chose Paper! You won the game!"
<Whatever happens if you win>
End
If Variable [xxxx:Opponent Choice] = 3 Then
Show Message "You chose Scissors! The opponent chose Scissors! The game is a tie!"
<Whatever happens if you tie>
End
End
In order to make it more interesting than this random model is then you could always "weight" the random assignment to make an opponent prefer a particular choice over the others (i.e. add strategy to the game). For instance, you could make it so muscular types prefer
Rock and so scholarly types prefer
Paper, meaning that the player can make a good guess based on reading the characters personality. That, however, is outside the scope of this tutorial!