I'm currently facing a problem while trying to animate the text box of the say screen. I have a sequence of 30 images for the text box showing, 60 images for the idle animation, and 30 images again for hiding it. My intention is to have the sequences play when showing, idle, or hiding, meaning that for example the window show and window hide statements should trigger the respective animations, and while characters are speaking the text box loops through the idle animation sequence. I want to do the same for the name box, in that case also triggering when going from the narrator without a displayed name to a character with a name and vice versa.
I managed to have the idle text box animation play by defining the image like this:
Code: Select all
image textbox_dx:
animation
xalign 0.5
yalign 1.0
"gui/textbox/textbox_idle00.png"
pause 1/60
"gui/textbox/textbox_idle01.png"
pause 1/60
...
"gui/textbox/textbox_idle59.png"
pause 1/60
repeat
Code: Select all
style window:
xalign 0.5
xfill True
yalign gui.textbox_yalign
ysize gui.textbox_height
background "textbox_dx"
Code: Select all
image textbox_dx:
...
"gui/textbox/textbox_show00.png"
pause 1/60
...
"gui/textbox/textbox_show29.png"
pause 1/60
block:
"gui/textbox/textbox_idle00.png"
pause 1/60
...
"gui/textbox/textbox_idle59.png"
pause 1/60
repeat
I tried using the on show and on hide events for this, since it seemed like they could be what I'm looking for. I tried using them like this:
Code: Select all
image textbox_dx:
...
on show:
"gui/textbox/textbox_show00.png"
pause 1/60
...
"gui/textbox/textbox_show29.png"
pause 1/60
on hide:
"gui/textbox/textbox_hide00.png"
pause 1/60
...
"gui/textbox/textbox_hide29.png"
pause 1/60
block:
"gui/textbox/textbox_idle00.png"
pause 1/60
...
"gui/textbox/textbox_idle59.png"
pause 1/60
repeat
Does anyone here maybe have any ideas on how to tackle this problem? Thanks in advance for any help, it would be greatly appreciated!