Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Fri May 24, 2013 12:02 pm

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: stats screen code help.
PostPosted: Wed May 02, 2012 11:02 pm 
Veteran

Joined: Mon Mar 26, 2012 6:51 pm
Posts: 389
Location: Philadelphia
Projects: Amy's Super Life!
So I now have this code to show a stat screen to the player:
screen stats:
frame:
has vbox
text ("stat1: %s" % stat1)
text ("stat2: %s" % stat2)

but where do I put it and what show command do I need? If you could edit this code in the correct way its supposed to be and tell me where it needs to go, I'd be so happy.

_________________
My blog : http://briannafactory.blogspot.com/


Top
 Profile Send private message  
 
PostPosted: Wed May 02, 2012 11:31 pm 
Veteran
User avatar

Joined: Fri Nov 11, 2011 12:26 am
Posts: 204
Location: Look behind you
Completed: Of Stupidity and Idiotic
Put this in the screen.rpy

Code:
screen stats:
    frame:
        has vbox
        text ("stat1: %s" % stat1)
        text ("stat2: %s" % stat2)


If you want to show the screen above, you need the command:
Code:
    show screen stats


This command go in the script, label start. When you want the stat screen to appear you just have to write something like this:

Code:
label start:
    $ stat1 = 0
    $ stat2 = 0
    "Blablablablabla"
    ## Now I want the player to see the stats!
    show screen stats
    "Continue the story here and the stat should appear somewhere on the screen already."

_________________
DA | Commission is open


Top
 Profile Send private message  
 
PostPosted: Tue May 08, 2012 1:10 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10778
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
In the latest Ren'Py, it's more idiomatic to write:

Code:
screen stats:
    frame:
        has vbox
        text "stat1: [stat1]"
        text "stat2: [stat2]"

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Donmai


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group