Making something happen with bars

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
MisterHarold
Regular
Posts: 49
Joined: Tue Jul 17, 2018 10:32 am
Location: Philippines
Contact:

Making something happen with bars

#1 Post by MisterHarold » Thu Sep 29, 2022 2:33 am

For example, if you slide a bar slider and it reaches a certain or specific value the background will change or it will jump to a label. Is it possible to do this with bars?
sample.jpg

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

Re: Making something happen with bars

#2 Post by Ocelot » Thu Sep 29, 2022 3:57 am

You can use:
a) changed property of bar itself:
https://www.renpy.org/doc/html/screens.html#bar
changed
If given, this should be a Python function. The function is called with the value of the adjustment when the adjustment is changed.
b) changed member of associated adjustment:
https://www.renpy.org/doc/html/screen_p ... adjustment
changed
This function is called with the new value when the value of the adjustment changes.
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]