Can i use formatting tags with text from variables? (solved)

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
Vendor_Honyaku
Regular
Posts: 30
Joined: Thu Apr 09, 2009 8:31 am
Projects: Honyaku-Subs translations
Location: Russia, Novosibirsk
Contact:

Can i use formatting tags with text from variables? (solved)

#1 Post by Vendor_Honyaku »

In my new project i want to maximally split game text and ren'py code.
In order to reach this goal i put text as variables.

Code: Select all

init:
    $ s0000 = "\"This is first string.\""
    $ s0001 = "\"And second...\""
    $ s0002 = "\"And... {w} the third.\""

    $ n1 = Character(color="#c8ffc8")
But i can't realize how to show this as normal text with working tags.

This code completely can't work:

Code: Select all

n1 s0000
This one can work, but can't operate text tags. Tags simply showed as normal text.

Code: Select all

n1 "%(s0000)s"
And this can operate with tags, but displayed text not in adv text window, and can't wait on {w} and {p} tags.

Code: Select all

show expression Text(s0000) as text
Last edited by Vendor_Honyaku on Tue May 25, 2010 12:41 pm, edited 1 time in total.
The bear looked on the car, and there was a wild gleam in his eyes. He knew what to do.

Vendor_Honyaku
Regular
Posts: 30
Joined: Thu Apr 09, 2009 8:31 am
Projects: Honyaku-Subs translations
Location: Russia, Novosibirsk
Contact:

Re: Can i use formatting tags with text from variables?

#2 Post by Vendor_Honyaku »

solved with

Code: Select all

 $renpy.say(n1,s0000) 
The bear looked on the car, and there was a wild gleam in his eyes. He knew what to do.

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]