Gallery Images seen count

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
henne
Newbie
Posts: 21
Joined: Tue May 25, 2021 6:10 am
Contact:

Gallery Images seen count

#1 Post by henne »

Hello,

First:
viewtopic.php?p=477176#p477176
I use pretty much this gallery code and it works, so thanks :)

Second:
My problem.
I want to count how many images were already seen by the player, so something like:

Code: Select all

default persistent.bg_seen = 0
default persistent.max_bg_seen = #whatever my max will be

##Somewhere in my gallery screen:

"[persistent.bg_seen]/[persistent.max_bg_seen]"
So I was wondering how to achieve that. I know that I would need to add "$ persistent.bg_seen += 1" somewhere but I don't seem to find the right place for it, aside from adding it under every image but that seems a bit awkward?

If something seems unclear please ask as English is not my first language.

giorgi1111
Veteran
Posts: 252
Joined: Sat May 04, 2024 10:40 pm
Contact:

Re: Gallery Images seen count

#2 Post by giorgi1111 »

You need to add setvariable seen +=1 in action i dont know yor code. If you getting thumbnails as imagebuttons and have action to see real image add there setvariable but it must be one time

Post Reply

Who is online

Users browsing this forum: Bing [Bot], kappamomo