Making Responsive Interactions
pcarver
09 Apr 2012, 15:27Dear Folks of Quest,
First, thank you to those who helped me with my first problem, it definitely helped my group out a lot! We really appreciate it. My second (and hopefully) final question has to do with interaction with a character in the game. We wanted to write our game so our player had to answer a riddle before being able to proceed in the game. How would we have to write it so they can talk back and forth but the answer to the riddle is specific? Thank you to everyone helping!
First, thank you to those who helped me with my first problem, it definitely helped my group out a lot! We really appreciate it. My second (and hopefully) final question has to do with interaction with a character in the game. We wanted to write our game so our player had to answer a riddle before being able to proceed in the game. How would we have to write it so they can talk back and forth but the answer to the riddle is specific? Thank you to everyone helping!

Pertex
10 Apr 2012, 07:40pcarver wrote: so they can talk back and forth but the answer to the riddle is specific?
Could you explain this a little more spezific?
pcarver
10 Apr 2012, 16:35We wanted to write the game so when the player entered the room, they would have to answer a riddle to be able to get the item from the room they need to complete the game. For example, one of the rooms is called Baker's Alley. When the player enters the room, there is the Baker waiting for the player. He asks what he's doing there and says "you must be here for the baking challenge and you want the perfect pie crust. If you want the crust, you have to answer my riddle." We need for the Baker to ask the riddle and only accept a particular answer, such as what do you call cheese thats not yours? The answer nacho cheese would be the only acceptable answer. Thank you, sorry for the confusion!
sgreig
10 Apr 2012, 20:30That's actually not too difficult. All you need is a script that executes when the player speaks to the baker. The script would be something like this:
msg ("You must be here for the baking challenge and you want the perfect pie crust. If you want the crust, you have to answer my riddle.")
msg ("The riddle is: What do you call cheese that is not yours?")
player_response = GetInput()
if (player_response = "nacho cheese") {
msg ("Correct! Here is the pie crust.")
pie_crust.parent = player
}
else {
msg ("I'm sorry, that's not the correct answer.")
}