Animating Outlines

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.
Post Reply
Message
Author
Akhilles
Newbie
Posts: 3
Joined: Sun Jun 12, 2022 1:53 pm
Contact:

Animating Outlines

#1 Post by Akhilles » Wed Jul 06, 2022 1:19 pm

Hey there everyone!

Hope you are all having a great day :)

I was wondering if it was possible to create a shake effect for the outlines in the main menu text.

Let me show you what I mean.

Here is the code:

style navigation_button_text:
properties gui.button_text_properties("navigation_button")
outlines [(absolute(1), "#99370C", absolute(3), absolute(0))]
xalign 0.5

I was wondering if I can make that outlines wiggle or shake around.

Thank you!

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Animating Outlines

#2 Post by Ocelot » Wed Jul 06, 2022 2:14 pm

I would just create 2 text displayables one above the other. One would have transparent outlines, other would have coth text and outlines same color. Bottom (outline) displayable will have shake transform applied to it.
< < insert Rick Cook quote here > >

Akhilles
Newbie
Posts: 3
Joined: Sun Jun 12, 2022 1:53 pm
Contact:

Re: Animating Outlines

#3 Post by Akhilles » Wed Jul 06, 2022 4:23 pm

Thanks for the tip.

I'm fairly new to this and I'm trying to modify the main menu. So do I simply use:

style navigation_button_text:
properties gui.button_text_properties("navigation_button")
outlines [(absolute(1), , absolute(3), absolute(0))]
xalign 0.5

style navigation_button_text:
properties gui.button_text_properties("navigation_button")
outlines [(absolute(1), "#99370C", absolute(3), absolute(0))]

init:
transform my_shake:
linear 0.1 xoffset -2 yoffset 2
linear 0.1 xoffset 3 yoffset -3
linear 0.1 xoffset 2 yoffset -2
linear 0.1 xoffset -3 yoffset 3
linear 0.1 xoffset 0 yoffset 0
repeat

add my_shake

xalign 0.5

I'm probably getting this all wrong in my head. Let me know what I should be changing.
Ocelot wrote:
Wed Jul 06, 2022 2:14 pm
I would just create 2 text displayables one above the other. One would have transparent outlines, other would have coth text and outlines same color. Bottom (outline) displayable will have shake transform applied to it.

Post Reply

Who is online

Users browsing this forum: Google [Bot]