customized responses based on player input
Posted: Sun Feb 24, 2019 12:56 pm
At the beginning of my game as a joke I prompt the player to input their name but then later issue them a predetermined name, sort of like Toby Fox's Deltarune.
I'm a complete coding amateur so I'm not sure if there's a way to do this in this program, but I was wondering if there was any way to customize my game's response to what the player types in.
For example, if they typed in the name of a pre-existing character, is there a way I could show only certain scenes, or end the game immediately?
Or at least not allow them to input the name I will assign them?
Here is the code I'm using for reference:
I'm a complete coding amateur so I'm not sure if there's a way to do this in this program, but I was wondering if there was any way to customize my game's response to what the player types in.
For example, if they typed in the name of a pre-existing character, is there a way I could show only certain scenes, or end the game immediately?
Or at least not allow them to input the name I will assign them?
Here is the code I'm using for reference:
Code: Select all
define pov = Character("[povname]")
python:
povname = renpy.input("So. What is your name?")
povname = povname.strip()
"Nice to meet you, [povname]."