Transform/Animate screen button after clicked, then trigger a function?

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
jungjung
Newbie
Posts: 2
Joined: Tue Nov 14, 2017 6:40 am
Contact:

Transform/Animate screen button after clicked, then trigger a function?

#1 Post by jungjung »

Hi everyone, I'm super new here so please bear with me.

Question: how can I make a screen button transforming/animating itself only after clicked? and then triggers a function once the transformation/animation is finished?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Transform/Animate screen button after clicked, then trigger a function?

#2 Post by Imperf3kt »

Yes, you can use the "on hide" function within a screenso a transition or other animation takes place before a button's 'action'

https://www.renpy.org/doc/html/atl.html#on-statement
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

jungjung
Newbie
Posts: 2
Joined: Tue Nov 14, 2017 6:40 am
Contact:

Re: Transform/Animate screen button after clicked, then trigger a function?

#3 Post by jungjung »

Imperf3kt wrote: Wed Nov 15, 2017 10:34 pm Yes, you can use the "on hide" function within a screenso a transition or other animation takes place before a button's 'action'

https://www.renpy.org/doc/html/atl.html#on-statement
Thanks for your reply but I don't really get how it works. Can you provide some simple codes?

Post Reply

Who is online

Users browsing this forum: Google [Bot]