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.
-
LiveTurkey
- Regular
- Posts: 106
- Joined: Tue Dec 27, 2016 10:50 pm
- Location: Brooklyn
-
Contact:
#1
Post
by LiveTurkey » Sat Aug 04, 2018 5:08 pm
So I'm trying to get the player to enter a character name and I have two minor visual bugs.
Here is a picture
The first bug is that the place where you type happens directly over the place where it says "Enter your name"
The second bug is that the cursor is not where the player is typing. The player is typing where the first line begins but if you look, the cursor is to the right and up of the word "name". Where the orange meets the white.
The code I have for this is pretty simple
Code: Select all
python:
name = renpy.input(" Enter your name", allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", length=10)
name = name.strip()
if not name:
name = "Anon"
Does anyone know how to fix these two bugs?
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#2
Post
by Imperf3kt » Sat Aug 04, 2018 5:55 pm
I think you have some indentation errors
I suggest trying this:
Code: Select all
python:
name = renpy.input('Enter your name', allow=' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', length=10)
name = name.strip()
if not name:
name = "Anon"
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project:
GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
LiveTurkey
- Regular
- Posts: 106
- Joined: Tue Dec 27, 2016 10:50 pm
- Location: Brooklyn
-
Contact:
#3
Post
by LiveTurkey » Sat Aug 04, 2018 6:04 pm
Imperf3kt wrote: ↑Sat Aug 04, 2018 5:55 pm
I think you have some indentation errors
I suggest trying this:
Code: Select all
python:
name = renpy.input('Enter your name', allow=' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', length=10)
name = name.strip()
if not name:
name = "Anon"
If I get rid of the spaces, it puts "Enter your name before the red line (at the border of the text box. )
-
Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
-
Contact:
#4
Post
by Per K Grok » Sun Aug 05, 2018 2:00 am
LiveTurkey wrote: ↑Sat Aug 04, 2018 6:04 pm
----
If I get rid of the spaces, it puts "Enter your name before the red line (at the border of the text box. )
Move the textbox so the text is positioned where you want it in relation to the background, without using empty spaces..
Users browsing this forum: Google [Bot]