Question about syncing up two animated sequences
Posted: Mon Jan 17, 2022 8:31 am
Hello! I have a question about synching two animated sprites. The idea is to wait for the first animated sequence to end properly, signal that it reached the ending somehow, and trigger the second part of it. To help visualize it, think of a palm tree under a light breeze on the first animated sequence, and the second one it’s under a storm.
The code right now looks something like this:
The problem is, I don’t know how long the player will be on the first text block and can’t sync up the second animated sequence. It works great if timed properly since the starting frames of both animations are the same. If the change is timed wrong, there’s a visual jerk to the starting point.
Just to be clear, animated sequences look like this:
The real sequence is longer, but the code is the same for all other frames.
I’m not good with the code and looking up a solution in Renpy’s manuals, but didn’t find a way to sync up the transactions between two animated sequences. Is there such an option at all? I tried using boolean switches with $ sync_flag = True before the last pause, yet I get syntax errors and am not really sure what to do next.
Any help with be greatly appreciated! Thanks!
The code right now looks something like this:
Code: Select all
show palm_calm
“What a nice day!”
show palm_storm
“Oh, no! It’s a storm!”
Just to be clear, animated sequences look like this:
Code: Select all
image palm_calm:
“palm_calm1.png” with Dissolve(0.2)
pause 0.3
“palm_calm2.png” with Dissolve(0.2)
pause 0.3
repeat
I’m not good with the code and looking up a solution in Renpy’s manuals, but didn’t find a way to sync up the transactions between two animated sequences. Is there such an option at all? I tried using boolean switches with $ sync_flag = True before the last pause, yet I get syntax errors and am not really sure what to do next.
Any help with be greatly appreciated! Thanks!