Hello! I have a question: how to make two characters speak at the same time in separate textboxes?
Here's what I mean: (mad painting skillz, I know :D)
How to make two characters speaking at the same time?
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.
- Chasing Summer
- Regular
- Posts: 95
- Joined: Thu Jan 09, 2014 12:12 pm
- Projects: unannounced project
- Location: Sweden
- Contact:
Re: How to make two characters speaking at the same time?
Well.. I’m not sure I can be much help. I do know what you could do if you want two characters to speak at the same time and saying the same thing. Judging what you drew with your awesome skillz, I don’t think that’s what you meant. Good luck!
new account: sonnenblumen
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: How to make two characters speaking at the same time?
There is a code for it, but not sure ren'py will have it in default. (https://github.com/renpy/renpy/pull/144)
I wrote a code to do simpler, but not flexible way in the past at http://lemmasoft.renai.us/forums/viewto ... 81#p249581
I wrote a code to do simpler, but not flexible way in the past at http://lemmasoft.renai.us/forums/viewto ... 81#p249581
Re: How to make two characters speaking at the same time?
Ummm, nyaatrap, I apologize for being such newbie, but I have a problem with using your code. I should paste it into script.rpy right? When I did it, and tried my characters to use it (g|m "I knew it!|Yikes!" that's what I tried to do), there appears error.
Thanks for help ^^.
Thanks for help ^^.
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: How to make two characters speaking at the same time?
I suspect you need:
with both parts quoted
Code: Select all
"g|m" "I knew it!|Yikes!"
Re: How to make two characters speaking at the same time?
Unfortunately, this didn't work. When I did what you said Asceai, this has appeared.
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: How to make two characters speaking at the same time?
You need to edit the say code in screens.rpy and hack in nyaatrap's code. In testing it I replaced the 'twowindow' bit of code with it. What you want is for the normal code to be called if there's no | found in the string.
e.g.
like nyaatrap said, it requires screen coding to customise. For example, the hardcoded positions require quite a large screen width and height to work properly, so you'd either want to adjust those positions or make your screen bigger.
e.g.
Code: Select all
screen say:
# Defaults for side_image and two_window
default side_image = None
default two_window = False
if not what.find("|") == -1:
window:
area (32,536,512,200)
id "window"
if who:
text who.split("|")[0] id "who" ypos -0.2
text what.split("|")[0] id "what"
window:
area (640,536,512,200)
id "window"
if who:
text who.split("|")[1] id "who" ypos -0.2
text what.split("|")[1] id "what"
else:
# The two window variant.
vbox:
style "say_two_window_vbox"
if who:
window:
style "say_who_window"
text who:
id "who"
window:
id "window"
has vbox:
style "say_vbox"
text what id "what"
# If there's a side image, display it above the text.
if side_image:
add side_image
else:
add SideImage() xalign 0.0 yalign 1.0
# Use the quick menu.
use quick_menu
Who is online
Users browsing this forum: Tomoyo Ichijouji