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.
AERenoir
Veteran
Posts: 320 Joined: Fri May 27, 2011 8:23 pm
Contact:
#1
Post
by AERenoir » Tue Sep 11, 2018 3:57 am
Hi, in my name input screen, I have create a custom caret (the blinking line indicating the text) in the shape of a pen bouncing up and down.
This was built in Renpy 6.16.2. Ever since upgrading to Renpy 6.99.10 and upwards, this code doesn't work. The pen is there, but it's static and not moving. I do check the changes between builds, but I'm still kind of confused.
Code: Select all
image mycaret:
"brush.png"
yoffset -5
pause .4
yoffset 5
pause.4
repeat
image brush:
"mycaret"
xalign 0 yalign .9
init python:
def SetThumbnailFull():
config.thumbnail_width = config.screen_width
config.thumbnail_height = config.screen_height
#def entername(newstring):
# store.firstname = newstring
def entername(input_text):
global firstname
firstname = input_text
init:
$ style.input.caret = "brush"
default firstname = "Eileen"
Last edited by
AERenoir on Tue Sep 11, 2018 7:17 am, edited 1 time in total.
MaydohMaydoh
Regular
Posts: 165 Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:
#2
Post
by MaydohMaydoh » Tue Sep 11, 2018 4:38 am
Instead of having two separate images, try merging them,
Code: Select all
image mycaret:
"brush.png"
align (0.0, 0.9)
block:
yoffset -5
pause .4
yoffset 5
pause.4
repeat
AERenoir
Veteran
Posts: 320 Joined: Fri May 27, 2011 8:23 pm
Contact:
#3
Post
by AERenoir » Tue Sep 11, 2018 7:07 am
Tried it. It's still not moving.
I checked if maybe the animation loop code is what's broken, but when placed elsewhere (e.g. in the game scene), it does bounce as it should.
AERenoir
Veteran
Posts: 320 Joined: Fri May 27, 2011 8:23 pm
Contact:
#4
Post
by AERenoir » Wed Sep 12, 2018 6:14 am
Tried doing it another way, still not working
Code: Select all
image brush_caret:
"brush.png"
align (0.0, 0.9)
block:
yoffset -5
pause .4
yoffset 5
pause.4
repeat
style input:
caret "brush_caret"
init python:
def SetThumbnailFull():
config.thumbnail_width = config.screen_width
config.thumbnail_height = config.screen_height
def entername(input_text):
global firstname
firstname = input_text
init:
default firstname = "Eileen"
screen inputname:
add "name2.jpg"
input default firstname changed entername xpos 574 ypos 433 size 120 length 9 color "#000" font "YOZAKURA-Regular.otf"
philat
Eileen-Class Veteran
Posts: 1910 Joined: Wed Dec 04, 2013 12:33 pm
Contact:
#5
Post
by philat » Wed Sep 12, 2018 9:55 pm
Looks like, for whatever reason, the caret can't change its position after it's first rendered. Probably not changeable without PyTom's input.
AERenoir
Veteran
Posts: 320 Joined: Fri May 27, 2011 8:23 pm
Contact:
#6
Post
by AERenoir » Thu Sep 13, 2018 1:42 pm
Darn. I went and asked in the Renpy release thread, so hopefully Pytom can help.
Users browsing this forum: Bing [Bot] , Google [Bot] , Semrush [Bot]