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.
-
ArizaLuca
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
-
Contact:
#1
Post
by ArizaLuca » Thu Jul 25, 2019 8:36 pm
I want the choices to animate slightly-- for example when I hover over them, they rise slightly or whatnot-- and have put an ATL in there as follows:
Code: Select all
transform choiceappear:
alpha 0.0 yoffset -1.0
pause 0.0
easein 0.5 alpha 1.0 yoffset 0
on idle:
alpha 1.0 yoffset 0
on hover:
alpha 1.0 yoffset 0
easein 0.3 yoffset -0.5
Unfortunately the buttons don't... do that?
They're coded in like this.
Code: Select all
screen choice(items):
modal False
fixed:
at gui_inout
add "choiceoverlay":
alpha 0.7
hbox:
xcenter 0.5
yalign 0.3
spacing 80
for i in items:
button:
xysize (350, 600)
left_padding 60
right_padding 50
top_padding 100
background "gui/choice/choice_idle_background.png"
hover_background "gui/choice/choice_hover_background.png"
text i.caption xalign 0.5 style "choice_button_text"
hovered Play("system",guisfx_button_hover)
action [Play("system",guisfx_button_click),
i.action]
at choiceappear
It just won't do it. There's nothing inherently wrong; just no transition or anything.
For anyone who saw my previous thread about my Choice screen, I apologize for my awful ability to understand code, but I felt this was a different issue and so it fit more to put it in a new thread.
Last edited by
ArizaLuca on Fri Jul 26, 2019 1:48 pm, edited 1 time in total.
-
ArizaLuca
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
-
Contact:
#3
Post
by ArizaLuca » Fri Jul 26, 2019 8:01 am
I don't think I'm supposed to put quotation marks around the transform? I've never done it before. (Nope, I'm not, just tested it.)
I really don't know why the transform isn't applying to the choice? Or if there's a different way you're supposed to animate choices.
-
Kia
- Eileen-Class Veteran
- Posts: 1011
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
-
Contact:
#4
Post
by Kia » Fri Jul 26, 2019 12:53 pm
try:
Code: Select all
transform choiceappear:
alpha 0.0 yoffset -10
pause 0.0
easein 0.5 alpha 1.0 yoffset 0
on idle:
easein 0.3 yoffset 0
on hover:
easein 0.3 yoffset -10
-
ArizaLuca
- Veteran
- Posts: 241
- Joined: Tue Feb 20, 2018 12:59 pm
- Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
- Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
- Organization: Astral Autumn Games
- Tumblr: astralautumngames
- Deviantart: ArizaLuca
- itch: astralautumngames
-
Contact:
#5
Post
by ArizaLuca » Fri Jul 26, 2019 12:59 pm
Oh! Alright, that worked. I guess I need to put in bigger numbers for yoffset xD
Thank you!
Users browsing this forum: Bing [Bot], Google [Bot], minyan