[solved] Need help in coding speech bubble textbox
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.
- propanoll
- Regular
- Posts: 55
- Joined: Fri Dec 21, 2012 8:58 am
- Projects: Left of Center, Night at the Hospital, The Buried Moon, RA: Allegiance
- Tumblr: propanoll
- Deviantart: shotafied
- Contact:
[solved] Need help in coding speech bubble textbox
Hi! Is it possible to achieve this kind of textbox style in Ren'py?
The textbox is speech bubble-like and whenever the next person says something, the speech bubble overlaps the previous one (Or the previous one retracts. This one works better, I think). Naturally, the textbox should also correspond to the positioned characters, but I have no idea how to do it or figure out the logic behind livecomposite lllorz . Please help?;;
The textbox is speech bubble-like and whenever the next person says something, the speech bubble overlaps the previous one (Or the previous one retracts. This one works better, I think). Naturally, the textbox should also correspond to the positioned characters, but I have no idea how to do it or figure out the logic behind livecomposite lllorz . Please help?;;
Last edited by propanoll on Tue Mar 12, 2013 9:58 am, edited 1 time in total.
Re: Need help in coding speech bubble textbox
Yes, it is possible. You need to create a separate text window for each character and assign that window to them. That will ensure desired behavior and you can position those windows according to characters positions.
If you're planning to move characters around, you'll have to get creative... like a function that positions the window depending on character's image or something like that.
If you're planning to move characters around, you'll have to get creative... like a function that positions the window depending on character's image or something like that.
- propanoll
- Regular
- Posts: 55
- Joined: Fri Dec 21, 2012 8:58 am
- Projects: Left of Center, Night at the Hospital, The Buried Moon, RA: Allegiance
- Tumblr: propanoll
- Deviantart: shotafied
- Contact:
Re: Need help in coding speech bubble textbox
I don't really want to assign the windows according to the characters, but rather, the position. Do they work the same way?
Re: Need help in coding speech bubble textbox
I do not understand... You can obviously position any window you create or the default one that comes with RenPy as you like BUT in order to adjust position of that window to a position of an image as it appears on the screen, would require some coding (or at least I know of no simple way to achieve that).propanoll wrote:I don't really want to assign the windows according to the characters, but rather, the position. Do they work the same way?
Maybe someone else who has experience with this type of design or knows RenPy better could be of assistance...
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: Need help in coding speech bubble textbox
Textboxes appear and disappear according to the character assigned to that text-box.propanoll wrote: The textbox is speech bubble-like and whenever the next person says something, the speech bubble overlaps the previous one (Or the previous one retracts. This one works better, I think). Naturally, the textbox should also correspond to the positioned characters, but I have no idea how to do it or figure out the logic behind livecomposite lllorz . Please help?;;
-- And that's the main problem you're going to have to deal with: Text-boxes are Assigned. That's what makes them appear.
Yes, it's entirely possible to have different text-boxes for a character in any number of different positions. The trick is, you have to assign each text-box individually, and Call them individually. In other words, you're going to need to assign a new text-box for Each Position.
Example: Coded for a 600x800 Game.
-- In your script.rpy file, in the init section:
Code: Select all
#A normal character using the default box.
define a = Character('Arthur',
color="#6699cc",)
# This is Arthur's Special textbox on the left. --------------------
define a_lft = Character('Arthur',
color="99ccff",
who_xpos = 20,
window_background = Frame("ui/TxtBox_proLft.png", 0, 0),
window_yminimum = 200,
window_left_margin = 0,
window_right_margin = 100,
window_top_margin = 6,
window_bottom_margin = 0,
window_left_padding = 50,
window_right_padding = 50,
window_top_padding = 13,
window_bottom_padding = 10,
ctc="ctc_blink",)
#This is Arthur's Special textbox on the right. -----------------
define a_rt= Character('Arthur',
color="99ccff",
who_xpos = 475,
window_background = Frame("ui/TxtBox_proRt.png", 0, 0),
window_yminimum = 200,
window_left_margin = 100,
window_right_margin = 0,
window_top_margin = 6,
window_bottom_margin = 0,
window_left_padding = 75,
window_right_padding = 50,
window_top_padding = 13,
window_bottom_padding = 10,
ctc="ctc_blink",)
Code: Select all
label start:
scene bg00 with fade
show art at basicfade, left
a_lft "You've created a new Ren'Py game."
show art at right with move
a_rt "Once you add a story, pictures, and music, you can release it to the world!"
hide art at basicfade
Last edited by OokamiKasumi on Wed Mar 06, 2013 9:09 pm, edited 1 time in total.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Re: Need help in coding speech bubble textbox
Well, that was a damn good explanation
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: Need help in coding speech bubble textbox
LOL! Thanks.xela wrote:Well, that was a damn good explanation
-- I firmly believe in giving thorough instructions. It saves on time, and extra posts asking for clarification.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
- propanoll
- Regular
- Posts: 55
- Joined: Fri Dec 21, 2012 8:58 am
- Projects: Left of Center, Night at the Hospital, The Buried Moon, RA: Allegiance
- Tumblr: propanoll
- Deviantart: shotafied
- Contact:
Re: [solved] Need help in coding speech bubble textbox
Oooh, thank you so much! You're my life-saver ;v;
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: [solved] Need help in coding speech bubble textbox
Glad I could help.propanoll wrote:Oooh, thank you so much! You're my life-saver ;v;
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Who is online
Users browsing this forum: Google [Bot]