(Solved) Help adding pagination please

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
Schnauzer
Regular
Posts: 35
Joined: Mon May 04, 2009 6:08 pm
Location: Bucaramanga, Colombia
Contact:

(Solved) Help adding pagination please

#1 Post by Schnauzer »

I'm not working in a game but a tale so I need to make a counter that show me the progress in the tale. The idea is to show in the upper right side (or any other place) a counter that show me the times any text have been shown. A simmilar function of the Ren'Py v9 tutorial that show the exactly line in the source code that is being executed.

Thanks a lot!
Last edited by Schnauzer on Mon Feb 01, 2010 9:28 pm, edited 1 time in total.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Help adding pagination please

#2 Post by JQuartz »

Schnauzer wrote:The idea is to show in the upper right side (or any other place) a counter that show me the times any text have been shown.
You can try using overlay like so:

Code: Select all

init:
    $ progress = 0
    $ show_progress=False

    python hide:
        def progress_overlay():
            if show_progress:
                ui.text(str(progress)+"% completed", xalign=1.0)

        config.overlay_functions.append(progress_overlay)
        
label start:
    $ show_progress=True
    "Story starts"
    $ progress=1
    "Story reaches 1%%"
    $ progress=50
    "Story reaches 50%%"
    $ progress=100
    "Story reaches the end."
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Schnauzer
Regular
Posts: 35
Joined: Mon May 04, 2009 6:08 pm
Location: Bucaramanga, Colombia
Contact:

Re: Help adding pagination please

#3 Post by Schnauzer »

Emmm, excuse me but... where I have to add that code? ...at beginig of the script.rpy file?

Ok ok, I got it ^_^ Thank you very much man!

Post Reply

Who is online

Users browsing this forum: No registered users