See AnimatedValue bar's changing value?

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
User avatar
Dark79
Regular
Posts: 63
Joined: Sun Apr 18, 2021 2:21 pm
Contact:

See AnimatedValue bar's changing value?

#1 Post by Dark79 »

Hello there,


Is there a way to see AnimatedValue bar's actual changing value?. What I mean:

Code: Select all

screen Test_Screen():

    default var_value = 40
    default max_value = 40

    bar value AnimatedValue(var_value, max_value, 0.5):
        align(0.5,0.0)
    
    vbox:
        align(0.5,0.2)

        textbutton "Test change -" action SetScreenVariable("var_value", var_value - 20)
        textbutton "Test change +" action SetScreenVariable("var_value", var_value + 20)        

Basically I want to see not only how smoothly the AnimatedValue bar is going down/up but also the actual numbers going down/up smoothly.

I can put just a simple text display but it will be instant change that is not exactly ideal.

Thanks in advance :D

philat
Eileen-Class Veteran
Posts: 1926
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: See AnimatedValue bar's changing value?

#2 Post by philat »

You can find some examples around the forums on animating number values. e.g. viewtopic.php?t=66563

User avatar
Dark79
Regular
Posts: 63
Joined: Sun Apr 18, 2021 2:21 pm
Contact:

Re: See AnimatedValue bar's changing value?

#3 Post by Dark79 »

Yeah that time I was using for numbers only, but i just wonder if there is a way to follow the AnimatedValue Bar behaviour like actually "track" the bar's animation with number values together. As it seems for now AnimatedValue does not have this function, so I guess you have to make two separate entities.

philat
Eileen-Class Veteran
Posts: 1926
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: See AnimatedValue bar's changing value?

#4 Post by philat »

Lol I didn't realize you were the same person. I was referring also to Remix's Extra AnimatedValue library which you linked in that question -- that extends AnimatedValue to access the current value of the AnimatedValue and output it as text, which seems like what you are asking for.

User avatar
Dark79
Regular
Posts: 63
Joined: Sun Apr 18, 2021 2:21 pm
Contact:

Re: See AnimatedValue bar's changing value?

#5 Post by Dark79 »

philat wrote: Thu Dec 14, 2023 2:01 am Lol I didn't realize you were the same person. I was referring also to Remix's Extra AnimatedValue library which you linked in that question -- that extends AnimatedValue to access the current value of the AnimatedValue and output it as text, which seems like what you are asking for.
Yeah, i liked Remix's Extra AnimatedValue too, it is just i assumed there is a more easier way to achieve same goal, since I thought Remix's code is quite complicated to gasp because it includes extra features and my OOP knowledge isn't that great.

But for now I will settle with this. :)

Post Reply

Who is online

Users browsing this forum: No registered users