Animated images within screens not always updating.
Posted: Wed Feb 01, 2017 9:35 pm
I have this strange recurring issue with animations within screens. Sometimes the animations run as expected, and sometimes the animations don't do anything as if they only ever received one update. I looked through the boards for an answer but couldn't find anything specifically for this problem. I find that if I put the animation beneath a window tag it works most of the time, but if the animation is within a frame or fixed the animation doesn't work.
For instance I have the following code in two separate screens, but the animation only works in one of the screens:
The "candle_scroll" images should be slowly moving across the screen, but are instead stationary. I tried to figure out how to make a screen re-draw every frame by forcing a new interaction, but that destroys screen state like what button is selected.
The screen where this animation works is technically a menu that I added to the quickmenu bar. The screen where the animation doesn't work I'm displaying using "call screen character_generation".
Any help is appreciated!
For instance I have the following code in two separate screens, but the animation only works in one of the screens:
Code: Select all
init -1:
image candle_scroll:
"images/ui/char_rec_back_scroll.png"
xalign 0.0
linear 240.0 xalign 110.0
repeat
image candle_scroll_2:
"images/ui/char_rec_back_scroll.png"
xalign -110.0
linear 240.0 xalign 0.0
repeat
screen character_generation():
tag menu
default cur_tab = 0
default selected_item = -1
default hovered_list = []
window:
xpadding 0
ypadding 0
add "images/ui/char_rec_back.png"
add "candle_scroll"
add "candle_scroll_2"
fixed:
imagebutton auto "images/ui/charrec_char_button_%s.png" xpos (795 / 1280.0) ypos (76 / 720.0) action [SelectedIf(cur_tab==0), SetScreenVariable('cur_tab', 0)]
add "images/protag/normal.png" xalign 0.5 ypos -0.11
The screen where this animation works is technically a menu that I added to the quickmenu bar. The screen where the animation doesn't work I'm displaying using "call screen character_generation".
Any help is appreciated!