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.
IndiaInk
Newbie
Posts: 3 Joined: Thu Jan 17, 2019 11:53 am
Contact:
#1
Post
by IndiaInk » Thu Jan 17, 2019 12:47 pm
Hello, everyone! First time poster on the forum, here. I've been having a tiny, but very specific problem, and I thought someone more familiar with the engine might understand how to fix it.
https://drive.google.com/file/d/1-zLpPW ... sp=sharing
In the video above I've changed my notify screen's background into an animation. It seems that if I call for the notify again, it doesn't repeat the animation.
The only time it does replay is if I go back to the main menu and load the game again.
Is there anyway I could get the animation to repeat? Any help is appreciated.
Here's my code, if anyone needs to see it:
script.rpy
Code: Select all
#Notify#
image notify_border:
xpos 0 ypos 0
"gui/notify/notify_1.png"
0.083
"gui/notify/notify_2.png"
0.083
"gui/notify/notify_3.png"
0.249
"gui/notify/notify_4.png"
0.083
"gui/notify/notify_5.png"
0.083
"gui/notify/notify_6.png"
0.083
"gui/notify/notify_7.png"
0.083
transform notify_fade_in:
alpha 0
pause 0.581
linear 0.01 alpha 1.0
screens.rpy
Code: Select all
screen notify(message):
zorder 100
style_prefix "notify"
frame at notify_appear:
text "[message!tq]" at notify_fade_in
timer 3.25 action Hide('notify')
transform notify_appear:
on show:
alpha 0
linear 0 alpha 1.0
on hide:
linear 0.5 alpha 0.0
style notify_frame is empty
style notify_text is gui_text
style notify_frame:
ypos gui.notify_ypos
xpos 755
background ("notify_border")
style notify_text:
properties gui.text_properties("notify")
font "gui/fonts/wigwag-bold.ttf"
xalign 0.5
ypos 180
xpos 200
Last edited by
IndiaInk on Sun Jan 20, 2019 2:05 pm, edited 1 time in total.
Remix
Eileen-Class Veteran
Posts: 1628 Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:
#2
Post
by Remix » Thu Jan 17, 2019 1:41 pm
Maybe:
Code: Select all
image notify_border:
xpos 0 ypos 0
on show, start, replace:
"gui/notify/notify_1.png"
0.083
"gui/notify/notify_2.png"
0.083
"gui/notify/notify_3.png"
0.249
"gui/notify/notify_4.png"
0.083
"gui/notify/notify_5.png"
0.083
"gui/notify/notify_6.png"
0.083
"gui/notify/notify_7.png"
# 0.083
Untested though
IndiaInk
Newbie
Posts: 3 Joined: Thu Jan 17, 2019 11:53 am
Contact:
#3
Post
by IndiaInk » Thu Jan 17, 2019 5:13 pm
I tried it out, and it remained the same.
However, you did give me an idea.
I commented out "image notify_border" from script.rpy, and instead did this in screens.rpy:
Code: Select all
transform notify_appear:
on show:
alpha 0
linear 0 alpha 1.0
"gui/notify/notify_1.png"
0.083
"gui/notify/notify_2.png"
0.083
"gui/notify/notify_3.png"
0.249
"gui/notify/notify_4.png"
0.083
"gui/notify/notify_5.png"
0.083
"gui/notify/notify_6.png"
0.083
"gui/notify/notify_7.png"
5
on hide:
linear 0.5 alpha 0.0
style notify_frame is empty
style notify_text is gui_text
style notify_frame:
ypos gui.notify_ypos
xpos 755
#background ("notify_border")
I got this result:
https://drive.google.com/file/d/1MAZpq1 ... sp=sharing '
It nearly works. The only problem is that the text isn't appearing. Looking at my code, based on where the transform "notify_appear" is:
Code: Select all
screen notify(message):
zorder 100
style_prefix "notify"
frame at notify_appear:
text "[message!tq]" at notify_fade_in
timer 3.25 action Hide('notify')
-the text is appearing below the animation now. Is there any way to get that text above the images, or is this method too broken to use?
Remix
Eileen-Class Veteran
Posts: 1628 Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:
#4
Post
by Remix » Thu Jan 17, 2019 6:16 pm
Though you will have to tweak the styles etc, it seems to work if just using a window background:
Code: Select all
image notify_frame:
alpha 1.0
"images/bg 0.png"
0.2
"images/bg 1.png"
0.2
"images/bg 2.png"
0.2
"images/bg 3.png"
0.2
"images/bg 4.png"
screen notify(message):
zorder 100
style_prefix "notify"
window:
xfill False
xminimum 200
yfill False # dunno if this one works
background Frame("notify_frame", 10, 10)
text "[message!tq]"
timer 6.0 action Hide('notify')
Might work if you just edit the background Frame in:
Code: Select all
style notify_frame:
ypos gui.notify_ypos
background Frame("gui/notify.png", gui.notify_frame_borders, tile=gui.frame_tile)
padding gui.notify_frame_borders.padding
and leave the notify screen like normal
IndiaInk
Newbie
Posts: 3 Joined: Thu Jan 17, 2019 11:53 am
Contact:
#5
Post
by IndiaInk » Fri Jan 18, 2019 12:59 pm
I went with the first option you posted in the last reply, and it works perfectly now! Just needed those few little tweaks like you said.
https://drive.google.com/file/d/1NWGdJk ... sp=sharing
Thank you so much!
(Here's the final working code for anyone who wants a look):
script.rpy
Code: Select all
image notify_border:
xpos 0 ypos 0
"gui/notify/notify_1.png"
0.083
"gui/notify/notify_2.png"
0.083
"gui/notify/notify_3.png"
0.249
"gui/notify/notify_4.png"
0.083
"gui/notify/notify_5.png"
0.083
"gui/notify/notify_6.png"
0.083
"gui/notify/notify_7.png"
transform notify_fade_in:
alpha 0
pause 0.6
linear 0.01 alpha 1.0
screens.rpy
Code: Select all
screen notify(message):
zorder 100
style_prefix "notify"
window at notify_appear:
xfill False
xminimum 413
yfill False
ypos 875
background Frame("notify_border")
text "[message!tq]" at notify_fade_in
timer 3.25 action Hide('notify')
transform notify_appear:
on show:
alpha 0
linear 0 alpha 1.0
on hide:
linear 0.5 alpha 0.0
style notify_frame is empty
style notify_text is gui_text
style notify_frame:
ypos gui.notify_ypos
xpos 755
style notify_text:
properties gui.text_properties("notify")
font "gui/fonts/wigwag-bold.ttf"
xalign 0.5
ypos 195
xpos 200
Users browsing this forum: No registered users