A Question about Text In-put [SOLVED]
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- aussieducky
- Regular
- Posts: 31
- Joined: Sat Dec 27, 2014 8:43 pm
- Projects: =
- Tumblr: aussiebunny
- Contact:
A Question about Text In-put [SOLVED]
So I know you can use text in-put to name a character, but can you use it to answer questions? In my game, I want the player to solve puzzles by typing in words and numbers. The answers are going to be very simple - no sentences. Is this possible? :0
Last edited by aussieducky on Mon May 18, 2015 1:00 am, edited 1 time in total.
I am a teenager who would like, very much, to finish a visual novel ;D
I don't know much about coding, but I'll try not to be a bother.
Currently working on: "Blackout"
I don't know much about coding, but I'll try not to be a bother.
Currently working on: "Blackout"
- Alera
- Miko-Class Veteran
- Posts: 651
- Joined: Sun Mar 21, 2010 3:20 am
- Completed: Tortichki // Zayay // Hero's Spirit
- Deviantart: psyalera
- itch: psyalera
- Location: UK
- Contact:
Re: A Question about Text In-put
That is entirely possible! The Doll's stories is one game I can think of that uses the text input quite extensively. But you can use it for simpler things as well.
The simplest way to do this is:
This topic: http://lemmasoft.renai.us/forums/viewto ... =8&t=29320 has quite a bit of information in it, if you skip the parts about making the actual keyboard, you can find out a lot about setting up passwords and specific answers. Like for example, you can set it so that the input only accepts numbers or specific characters.
The simplest way to do this is:
Code: Select all
$ answer = renpy.input(_("What is your answer?"))
"My answer is [answer]."
if answer =="Correct Answer": #change to whatever the answer of the riddle is
"You're correct!"
else:
"You're wrong!"
- aussieducky
- Regular
- Posts: 31
- Joined: Sat Dec 27, 2014 8:43 pm
- Projects: =
- Tumblr: aussiebunny
- Contact:
Re: A Question about Text In-put
Thank you so much! This works perfectly!Alera wrote:That is entirely possible! The Doll's stories is one game I can think of that uses the text input quite extensively. But you can use it for simpler things as well.
The simplest way to do this is:This topic: http://lemmasoft.renai.us/forums/viewto ... =8&t=29320 has quite a bit of information in it, if you skip the parts about making the actual keyboard, you can find out a lot about setting up passwords and specific answers. Like for example, you can set it so that the input only accepts numbers or specific characters.Code: Select all
$ answer = renpy.input(_("What is your answer?")) "My answer is [answer]." if answer =="Correct Answer": #change to whatever the answer of the riddle is "You're correct!" else: "You're wrong!"
I am a teenager who would like, very much, to finish a visual novel ;D
I don't know much about coding, but I'll try not to be a bother.
Currently working on: "Blackout"
I don't know much about coding, but I'll try not to be a bother.
Currently working on: "Blackout"
Who is online
Users browsing this forum: Ahrefs [Bot]