Attract-Mode Support > Scripting
animation pulse not working?
popoklo:
Ahoi!
try to do a pulsating selection Frame, it only runs once:
local flicker_anim = {
when = When.Always,
property = "alpha", time=300,
start = 255, end = 0,
loop = 1, pulse = 1
}
local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;
animation.add( PropertyAnimation( frame2, flicker_anim ) );
does anyone had the Problem? or knows my fault?
thx!
kent79:
--- Quote from: popoklo on October 08, 2017, 07:33:09 AM ---Ahoi!
try to do a pulsating selection Frame, it only runs once:
local flicker_anim = {
when = When.Always,
property = "alpha", time=300,
start = 255, end = 0,
loop = 1, pulse = 1
}
local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;
animation.add( PropertyAnimation( frame2, flicker_anim ) );
does anyone had the Problem? or knows my fault?
thx!
--- End quote ---
local flicker_anim = {
when = When.Always,
property = "alpha", time=300,
start = 255, end = 0,
loop = 1, pulse = 1
}
local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;
animation.add( PropertyAnimation( frame2, flicker_anim ) );
Should be
frame2.alpha = 255?
Actually, what is error log?
popoklo:
thx 4 your answer kent!
i tried everything. theres no error produced. cant get pulse working.
did a Workaround. Using TickCallback and check if Alpha is 0. then resetting to 255.
i dont like Workarounds. but ok.
popoklo:
anyone whos interested:
when = When.Always was 1 Problem. use Transition.StartLayout!!
and Loop = 1, pulse = 1, also does not work in my script.
i had to use Loop = true, pulse = true!!!!!!!
but why is pulse only working once! after that is does not reverse anymore and Loops only from start to end value.
does anybody know that Problem?
popoklo:
i tested kents new grid layout and there the pulse animation is also not working!
for u kent? it runs only at start once correct. but then no reverse of the alpha.
HELP PLZ
Navigation
[0] Message Index
[#] Next page
Go to full version