Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: kent79 on October 17, 2017, 05:09:18 PM
-
Dear All,
I have some trouble on adding as below animation. Please see the video of issue. I don't why the snap video is becoming smaller while switching faster. Please help me. Thanks.
animation.add( PropertyAnimation( snap_t, {property = "scale", start = 0, end = 1, time = 200}));
https://youtu.be/0eOEYz2lm0w
-
This worked for me:
//Background
local bg = fe.add_image("bg_base.png", 0, 0, flw, flh);
local bg_shrink_cfg = {
when = When.StartLayout,
when = Transition.ToNewList,
property = "scale",
start = 1.4,
end = 1.0,
time = 1000
tween = Tween.Quad,
}
animation.add( PropertyAnimation( bg, bg_shrink_cfg ) );
Maybe cant be "0" , try "-0.001" to "1.0"
-
This is not ok for grid theme. Anyway, I have forget it.
-
hey kent!
i also tried something with Timing Animation and had absolutely no Chance to fix the Situation you also seem to discovered:
in your Video:
Holding down a key for longer to go through games fast will fail animations or even conditions in tick callback. My variables should Change on tickcallback but do not if i hold a key to scroll through games and release it afterwards.
i didnt know a solution and tried VERY Long. no Chance.
-
Hey kent,
Yes, that is an unfortunate bug. It looks like it's getting incorrect position information when the new animation starts before the previous finishes. The way I implemented scaling was kinda hacky - so it was bound to show some issues. It may be possible to update some of the animations values when a new one starts to correct it, but I'd have to dig deeper with the code.