How can I define my "Stats"?

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
Gustavs14
Regular
Posts: 44
Joined: Mon Apr 03, 2017 2:06 pm
Contact:

How can I define my "Stats"?

#1 Post by Gustavs14 »

What am I doing incorrectly here?

http://imgur.com/a/bL6Vr

I want for it to start "counting" the affection points, but right now all I get is this kind of screen : http://imgur.com/a/hwG6f

So yeah... how do I "define", in this case, my "sister relationship" points? (but in general too, obviously).

Thanks

User avatar
DannyGMaster
Regular
Posts: 113
Joined: Fri Sep 02, 2016 11:07 am
Contact:

Re: How can I define my "Stats"?

#2 Post by DannyGMaster »

You should define your variables outside of the start label using the 'default' statement.

Code: Select all

default ls_points = 0

label start:
    
    menu:
         "Hug her.":
      
             $ ls_points += 1

    "Affection points: [ls_points]."
The silent voice within one's heart whispers the most profound wisdom.

Post Reply

Who is online

Users browsing this forum: Google [Bot]