How to have two instances of 'show text' simultaneously
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.
- Destiny-Smasher
- Regular
- Posts: 40
- Joined: Wed Aug 09, 2017 7:10 pm
- Projects: DownRight Fierce, Life is Strange: All Wounds
- Tumblr: destiny-smasher.tumblr.com
- itch: destiny-smasher
- Contact:
How to have two instances of 'show text' simultaneously
Having trouble figuring out this one since it's such a broad type of question for such a specific intention.
I've been learning ways to get more use out of the 'show text' function recently, but I can't figure out how I can get two instances of text to appear simultaneously. For instance, if I want to have two separate lines of separate text display on different parts of the screen at the same time, how do I make that happen? Do I have to define some kind of extra 'show text' function somehow?
I've been learning ways to get more use out of the 'show text' function recently, but I can't figure out how I can get two instances of text to appear simultaneously. For instance, if I want to have two separate lines of separate text display on different parts of the screen at the same time, how do I make that happen? Do I have to define some kind of extra 'show text' function somehow?
- Jackkel Dragon
- Veteran
- Posts: 283
- Joined: Mon Mar 31, 2014 7:17 pm
- Organization: Nightshade, Team Despair
- itch: jackkel-dragon
- Location: USA
- Contact:
Re: How to have two instances of 'show text' simultaneously
I don't know if it works with text displayables, but maybe try using the "as" keyword? That's how images can be duplicated, at least.
Example:
show character as c1 at left
show character as c2 at right
Example:
show character as c1 at left
show character as c2 at right
Main Website
Includes information about and links to many of my current and past projects.
Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series
Includes information about and links to many of my current and past projects.
Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3795
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: How to have two instances of 'show text' simultaneously
Code: Select all
show text _("my text")
show text _("My other text")
with none
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- m_from_space
- Miko-Class Veteran
- Posts: 985
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: How to have two instances of 'show text' simultaneously
Just create your own little screen!
Code: Select all
screen mytext(t1="", t2=""):
text t1:
pos (20, 20)
text t2:
align (0.5, 0.5)
label start:
show screen mytext("This is a sentence.", "This one is centered.")
Re: How to have two instances of 'show text' simultaneously
Yet another sample
Code: Select all
transform txt_pos(x=0, y=0):
pos (x, y)
# The game starts here.
label start:
"..."
show text "Test 1" as txt1 at txt_pos(0.1, 0.1)
show text "Test 2" as txt2 at txt_pos(0.5, 0.2)
show text "Test 3" as txt3 at truecenter
with Dissolve(2.0)
"?!"
- Destiny-Smasher
- Regular
- Posts: 40
- Joined: Wed Aug 09, 2017 7:10 pm
- Projects: DownRight Fierce, Life is Strange: All Wounds
- Tumblr: destiny-smasher.tumblr.com
- itch: destiny-smasher
- Contact:
Re: How to have two instances of 'show text' simultaneously
Hm, I don't think any of these will work in my case (I tried everything but the screens option and nothing seemed to work), maybe since I'm using Random function to call random lines of dialogue. BUT, maybe this could help with something else down the line where pre-set lines are being used! Thanks for the advice everyone!
- m_from_space
- Miko-Class Veteran
- Posts: 985
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: How to have two instances of 'show text' simultaneously
So, why didn't you test the screens option?
Make sure to understand that there is difference between "dialogue" and other kinds of text (like as part of the show text statements)!
So how do you call random lines of dialogue (which I assume are not really dialogue)?
Make sure to understand that there is difference between "dialogue" and other kinds of text (like as part of the show text statements)!
So how do you call random lines of dialogue (which I assume are not really dialogue)?
- Destiny-Smasher
- Regular
- Posts: 40
- Joined: Wed Aug 09, 2017 7:10 pm
- Projects: DownRight Fierce, Life is Strange: All Wounds
- Tumblr: destiny-smasher.tumblr.com
- itch: destiny-smasher
- Contact:
Re: How to have two instances of 'show text' simultaneously
The implementation of the screens function didn't look like it'd be compatible with the dialogue I'm implementing, which uses a random function. So each time a particular instance of dialogue is needed, it'll pull from a pool and randomly pick one. I'm not sure if that's compatible with the screens function mentioned above, though could still be useful in cases where you're using pre-set lines of dialogue, I suspect!
What I'm doing instead is having the random dialogue pop up over the character sprite, and then putting the "main text" in the narration box to show how much damage occurs. Which maybe actually works better, anyway. Though things like buffs/debuffs being applied could potentially utilize this same idea with two lines of dialogue appearing at once.
In my case, what I was wondering is, can I make a damage number (which itself is variable) pop up on screen as well as a random character line.define nemona_dodge = RandomDialogue('Missed me!{p}{bt=3}¡Jeje!{/bt}', '{bt=2}{i}Oooh,{/i}{/bt}{p}that’s a miss!', '{font=PokemonGb-RAeo.ttf}{size=-5}Bad RNG{/size}{/font}{p}for you, huh?', '{font=PokemonGb-RAeo.ttf}{size=-5}But it missed!{/size}{/font}{p}{bt=3}¡Jeje!{/bt}')
What I'm doing instead is having the random dialogue pop up over the character sprite, and then putting the "main text" in the narration box to show how much damage occurs. Which maybe actually works better, anyway. Though things like buffs/debuffs being applied could potentially utilize this same idea with two lines of dialogue appearing at once.
Who is online
Users browsing this forum: Ahrefs [Bot], decocloud