This is a little complicated as I'm doing many things at once, but please bear with me...
I have an animated text box for most of my game. As this can sometimes be annoying, I also have the default one which I use when the same character continues talking. In my game, the characters' dialogue boxes are in different locations on the screen, so the animation works well going between characters as it catches the eye, but unfortunately, it runs into issues...
Firstly, here's my code in screens.rpy:
Code: Select all
screen say(who, what):
style_prefix "say"
if (sayscreen_label is not None):
window at say_window_animation:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what" at text_fade_in
else:
window:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what"
Code: Select all
transform say_window_animation:
crop_relative True
alpha 0 crop (0,0, 0.0, 1.0)
linear 0.15 crop (0,0, 0.3, 1.0)
linear 0.25 alpha 1.0 crop(0,0, 1.0, 1.0 )
transform text_fade_in:
alpha 0
linear 1 alpha 1
Code: Select all
default sayscreen_label = None
Code: Select all
show katie_fall fun
with dissolve
k "First character is talking..." (window_style="window_tall_s1_fall") # same character, same dialogue box
$ sayscreen_label = None
window show # doesn't appear to work
hide katie_fall fun
with dissolve
k "... and is still talking." (window_style="window_tall_s1_fall") # same character, same dialogue box
$ sayscreen_label = "on"
show katie_fall close
with dissolve
m "Now, the other character is talking." (window_style="window_wide_bottom_middle") # different character, different dialogue box
--------------------------------------------------------------------
Another issue I have is when I use pauses in strings, like "{w=1}". The say screen animation repeats when there's a pause unless I switch it off with "$ sayscreen_label = None", but I only want to use this for when the same character is talking. I'd like the initial animation to still show, but not have it repeat whenever there's a pause. Is there a way to do a pause that doesn't break this?
Thanks for any help!
FYI, I'm using this format for strings "(window_style="window_tall_s1_fall")" instead of defining characters as I'm doing a comic book-style VN and the dialogue boxes move around a LOT!