%()s isn't working in show expression

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
M0ti
Regular
Posts: 66
Joined: Mon Aug 15, 2011 1:06 pm
Contact:

%()s isn't working in show expression

#1 Post by M0ti » Sat Aug 04, 2012 1:05 pm

Hi,

i am trying to create simulation of writing a letter. Player will see empty paper

Code: Select all

show vzkaz4 with dissolve:
       xanchor .5
       yanchor .5
       xpos .5
       ypos .35
And then he will choose what to write:

Code: Select all

menu:
    "About snow":
             $ topic = "I really like snow!"
    "About trees":
             $ topic = "I like trees."
And then it will shows on the empty paper.

Code: Select all

show expression Text("%(topic)s", size=25, color = "#000") as text with dissolve:
     xanchor .0
     yanchor .0
     xpos .1
     ypos .1
But that is only my wish. The only thing, written on empty paper is %(topic)s
If I use it in normal dialog sentence

Code: Select all

"Tom" "%(topic)s"
everything works normally. Only in expression not. Any idea, why? Or how I make my wish come true?

User avatar
Shalambay Shift
Regular
Posts: 71
Joined: Fri Aug 03, 2012 5:52 am
Projects: ASL!, PotD, MftBS, Capture~
Organization: Valonia, Shalambay Shift
Location: Milky Way
Contact:

Re: %()s isn't working in show expression

#2 Post by Shalambay Shift » Sat Aug 04, 2012 1:21 pm

Are you using Ren'Py 6.13 and up?
With those versions, you change all of these:

Code: Select all

%(variable)s
to:

Code: Select all

[variable]
Last edited by Shalambay Shift on Sun Aug 05, 2012 6:11 am, edited 1 time in total.
Image
VALONIA ~Shadow Valley~ | Blog
Nyofuuu~ fuu~ fuuu....

User avatar
M0ti
Regular
Posts: 66
Joined: Mon Aug 15, 2011 1:06 pm
Contact:

Re: %()s isn't working in show expression

#3 Post by M0ti » Sat Aug 04, 2012 3:11 pm

IT WORKS!!!! IT REALLY WORKS!!!! THANKS... now back to the work

Post Reply

Who is online

Users browsing this forum: Bing [Bot]