I've tried to figure this out for two days now, and not succeeded. My troubleshooting hasn't yielded results.
I have modified the choice screen, screen choice(items), to make it prettier. I'm trying to display four images when the screen is shown, each with its own transform.
I want them to happen in sequence, like this:
1. A dark overlay fades in
2. Two frames simultaneously slide in, one at the top and one at the bottom bottom
3. A composite image of the protagonist fades in in the middle
[The choice menu appears]
What actually happens when the screen is shown:
1. The dark overlay and the protagonist image instantly appear
2. The two frames slide in as they're intended to
[The choice menu appears]
I suspect that the different ATLs somehow interfere with each other, making the fading ATLs skip their visible transformation and just jump to their end states.
Is there a way to make these things happen in sequence? I've tried various ways to pause or wait in between the adding of the images, but they either aren't right for use on a screen or the screen just ignores them.
Here's my code.
The choice screen:
Code: Select all
screen choice(items):
add ImageReference("background_dimming") at normalfade
add ImageReference("choice_overlay_left") at qei(offscreenleft, left, 0.5)
add ImageReference("choice_overlay_right") at qei(offscreenright, left, 0.5)
add ImageReference("choice_protagonist") at protagchoice
style_prefix "choice"
vbox:
#text "[choice_exp]" ## Only to check if the status changes properly.
for i in items:
if "¦" in i.caption:
$ caption_parts = i.caption.split ("¦")
textbutton caption_parts[1]:
hovered SetVariable("choice_head", "{}".format(caption_parts[0]))
unhovered SetVariable("choice_head", "worried1")
action i.action
else:
textbutton i.caption action i.action
## When this is true, menu captions will be spoken by the narrator. When false,
## menu captions will be displayed as empty buttons.
define config.narrator_menu = True
style choice_vbox is vbox
style choice_button is button
style choice_button_text is button_text
style choice_vbox:
xalign 0.5 #Old: 0.5
ypos 615 #Old: 405
yanchor 0.5 #Old: 0.5
spacing gui.choice_spacing
style choice_button is default:
properties gui.button_properties("choice_button")
hover_sound "sfx/click.wav" #This makes the button click when it is hovered
#activate_sound "sfx/click.wav" #This makes the button click when you click it
style choice_button_text is default:
properties gui.button_text_properties("choice_button")Code: Select all
init:
transform protagchoice:
xalign 0.5
ypos -0.05
zoom 0.5
on show:
alpha 0.0
linear 0.5 alpha 1.0
on hide:
alpha 1.0
linear 0.5 alpha 0.0
# This fades in an image.
transform normalfade:
on show:
alpha 0.0
linear 0.5 alpha 1.0
on hide:
alpha 1.0
linear 0.5 alpha 0.0
# Moves an image onto the screen, quick ease in ("qei")
transform qei (start, end, time):
subpixel True
start
easein time end