How to show points on the screen?

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
WallyLC
Newbie
Posts: 2
Joined: Sat Sep 02, 2017 2:41 pm
Contact:

How to show points on the screen?

#1 Post by WallyLC »

So, I've been looking all around the Internet for how to do this for many hours and only one showed me numbers on screen but when I tried to adjust it to my needs it kept giving me errors so I deleted it. I'm really new to renpy and I'm still learning since I downloaded it 2 days ago. I basically just want to show "The_Sources" points on the screen.

I would also like to have a box around the numbers as well so I can see it better, like a message box I guess. So how would I do that?

I guess I should also say that I'm using the newest version of renpy and the new gui interface.

I've attached my scripts. Hopefully that helps! Thanks!
Attachments
screens.rpy
(37.99 KiB) Downloaded 177 times
script.rpy
(1.92 KiB) Downloaded 155 times
I hope you're having a great day! :-]

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: How to show points on the screen?

#2 Post by trooper6 »

First off, you should declare all of your variables using default.
Second, you just need to create a screen and show it.

Code: Select all

# The script of the game goes in this file.

# Declare characters used by this game. The color argument colorizes the
# name of the character.

define e = Character("Eileen")

default source = 0

screen source_screen():
    frame:
        align(1.0, 0.0)
        text "The Source: [source]"
    

# The game starts here.
label start:  
    show screen source_screen()
    
    "You shouls see the source points in the upper right corner."


    return
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
WallyLC
Newbie
Posts: 2
Joined: Sat Sep 02, 2017 2:41 pm
Contact:

Re: How to show points on the screen?

#3 Post by WallyLC »

Thank you trooper6! It works perfectly. :-]
I hope you're having a great day! :-]

Post Reply

Who is online

Users browsing this forum: Google [Bot]