Riddle

gearbox15

Villager
Member
Joined
Sep 4, 2018
Messages
8
Reaction score
1
First Language
English
Primarily Uses
VNM
Hello, I could use some help basically I'm make a puzzle where an NPC ask question six riddles if they get at least three they will be allowed to pass. the issue is that I don't know how to make the game know if the player got enough riddles right or not. I think it might involve variables and increasing them but I don't know how to do that.
 

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
5,110
Reaction score
4,397
First Language
English
Primarily Uses
RMVXA
Right. Have a variable called "Riddles Correct", and a variable called "Riddles Answered". When the player answers a riddle correctly, increase both of them by 1 (use "Control Variables" event command to do this). When the players answers incorrectly, increase only the Answered variable by 1.

When the Riddles Correct variable is at least 3, the NPC lets you pass (you can use a "Conditional Branch" event command to check whether Riddles Correct is >= 3).

If the Riddles Answered is 6 and the Riddles Correct is less than 3 (put one Conditional Branch inside the other), you know that they player failed. The NPC might say "You didn't get enough right, I won't move!" If you want to give the player another chance to answer all 6 riddles again, you can set both variables back to 0 ("Control Variables": Set equal to 0) and then ask the riddles again.
 

gearbox15

Villager
Member
Joined
Sep 4, 2018
Messages
8
Reaction score
1
First Language
English
Primarily Uses
VNM
Right. Have a variable called "Riddles Correct", and a variable called "Riddles Answered". When the player answers a riddle correctly, increase both of them by 1 (use "Control Variables" event command to do this). When the players answers incorrectly, increase only the Answered variable by 1.

When the Riddles Correct variable is at least 3, the NPC lets you pass (you can use a "Conditional Branch" event command to check whether Riddles Correct is >= 3).

If the Riddles Answered is 6 and the Riddles Correct is less than 3 (put one Conditional Branch inside the other), you know that they player failed. The NPC might say "You didn't get enough right, I won't move!" If you want to give the player another chance to answer all 6 riddles again, you can set both variables back to 0 ("Control Variables": Set equal to 0) and then ask the riddles again.
It worked thank you!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

made a bio for the protag in my project!
Beggar : "I haven't eat for days..."
Kid : "Just do crime! You will get daily necessity for free in prison~"
Stream is a bit late but will be live shortly with some game development! Feel free to drop by!
omg, why persona 5 is so good?

Forum statistics

Threads
99,158
Messages
962,429
Members
130,725
Latest member
teendinsaikha
Top