As {w=0.5}, and additionally {w=0.25} are honestly quite tedious to write multiple times over in the making of a game - as a result, I have been trying to code in {p1} as shorthand equal to {w=0.5}, and {p2} as shorthand to {w=0.25}, but I have been unable to find anything on this subject.
Could I get some help?
Using {p1} as shorthand for {w=0.5}?
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.
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.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Using {p1} as shorthand for {w=0.5}?
There isn't an easy way to add your own text tags that function. (As opposed to updating style information.)
What you can do is define a variable:
and substitute it in:
Which should give a similar effect, and be easier to type. (But you do have to remember to use the square brackets.)
What you can do is define a variable:
Code: Select all
define p1 = "{w=0.5}"
Code: Select all
"This is a [p1]short pause."
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Using {p1} as shorthand for {w=0.5}?
EDIT: Opps, did not notice PyTom's 2nd part.
You can however, use a variable to store text tag. Something like:
Note that the bracket is the square one []. This is because it's a variable substitution.
You can however, use a variable to store text tag. Something like:
Code: Select all
$p1="{w=0.5}"
mc "I [p1] think [p1] I [p1] am [p1] stu[p1]tter[p1]ing"
Last edited by Elmiwisa on Wed Oct 23, 2013 5:24 pm, edited 1 time in total.
Re: Using {p1} as shorthand for {w=0.5}?
Ah; that should help. Thanks!PyTom wrote:There isn't an easy way to add your own text tags that function. (As opposed to updating style information.)
What you can do is define a variable:
and substitute it in:Code: Select all
define p1 = "{w=0.5}"
Which should give a similar effect, and be easier to type. (But you do have to remember to use the square brackets.)Code: Select all
"This is a [p1]short pause."
There's one more release-related bug I seem to be encountering in the Alpha builds; but I'll see you in another thread for that :3
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]