Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 61: is not terminated with a newline. (Check strings and parenthesis.)
(Perhaps you left out a ' at the end of the first line.)
if user_input == (['hello','Hello','hello!','Hello!]):
Ren'Py Version: Ren'Py 7.3.2.320
Sat Aug 10 20:39:24 2019
I am a friendly user, please respect and have a good day.
## remove leading/trailing spaces, turn AbCdEf intro abcdef
$user_input=user_input.lower().strip()
## check known words
if user_input in ['hello!','hi!','hello','hi']:
m 'Hello!'
You may get better results if you use/write actual parser for such things.
## remove leading/trailing spaces, turn AbCdEf intro abcdef
$user_input=user_input.lower().strip()
## check known words
if user_input in ['hello!','hi!','hello','hi']:
m 'Hello!'
You may get better results if you use/write actual parser for such things.
Thanks also this one also worked!
I am a friendly user, please respect and have a good day.
## remove leading/trailing spaces, turn AbCdEf intro abcdef
$user_input=user_input.lower().strip()
## check known words
if user_input in ['hello!','hi!','hello','hi']:
m 'Hello!'
You may get better results if you use/write actual parser for such things.
$ user_input = renpy.input(prompt = "Type anything! Or if you want to go places, like for example, 'Lets go to music room.'. (SCHOOL PLACES ONLY!)", allow="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ /.,'?!")
I am a friendly user, please respect and have a good day.
label start:
$user_input = renpy.input(prompt = "Type anything! Or if you want to go places, like for example, 'Lets go to music room.'. (SCHOOL PLACES ONLY!)", allow="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ /.,'?!")
$user_input=user_input.lower().strip()
if user_input in ['hello','hello!','hi','hi!']:
'Bot' 'Greetings, Master.'
'Bot' 'What would you like today?'
return
Tho again this approach is very limited and buggy, this is why parser-based and general text input games pretty much died out decades ago.
label start:
$user_input = renpy.input(prompt = "Type anything! Or if you want to go places, like for example, 'Lets go to music room.'. (SCHOOL PLACES ONLY!)", allow="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ /.,'?!")
$user_input=user_input.lower().strip()
if user_input in ['hello','hello!','hi','hi!']:
'Bot' 'Greetings, Master.'
'Bot' 'What would you like today?'
return
Tho again this approach is very limited and buggy, this is why parser-based and general text input games pretty much died out decades ago.
Thank you for the reply! I will try this if i had a chance. (oops, need to fix that indention line.)
I just need to reply once more if i had a another problem.
I am a friendly user, please respect and have a good day.
If you want to build an interactive fiction game like back in the 80s, you might want to look into using one of the languages built specifically for that. It might be easier for you because they should have a parser already built in.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)