Counter on the game

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
xavieru
Newbie
Posts: 1
Joined: Wed Mar 02, 2016 5:05 pm
Contact:

Counter on the game

#1 Post by xavieru » Wed Mar 02, 2016 5:29 pm

Hi! I'm new here and I'm doing a game on Ren'py. The action will last 5 days (on the game) and I need to know how to put a counter on the screen and how to pass the day when you do some actions. Can you help me please?

User avatar
yuren
Newbie
Posts: 14
Joined: Sat Feb 20, 2016 2:41 am
Projects: chomp2
Github: yosephharyanto
Skype: yosephharyanto
Location: Indonesia
Contact:

Re: Counter on the game

#2 Post by yuren » Thu Mar 03, 2016 6:50 am

You'll need to maintain variable within your visual novel. Take look at http://renpy.org/wiki/renpy/doc/tutoria ... er_Choices

The basic idea is "I want the app to remember the counter of A", then you declare something like

Code: Select all

 $ A = 0 
saying that initially "I have a counter named A with the initial value to zero"

then everytime in the middle of the conversation (or choices) you want to increment counter,simply

Code: Select all

 $ A+=1 
Hope this helps

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]