Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: jedione on April 03, 2017, 06:50:19 PM
-
anyone know if their is a way to make a animation that will respond
to to or three movements IE:
local pic = fe.add_image("pic/lArrow.png", flx*0.200, fly*0.450, flw*0.060, flh*0.120 );
local pic_move_cfg = {
when =Transition.StartLayout ,
property = "x",
start = flx*0.040,
stop = flx*0.080,
start = flx*0.080,
end = flx*0.040,
time = 1000,
loop=true,
}
animation.add( PropertyAnimation( pic, pic_move_cfg ) );
-
For me only worked as joining diferent "properties" for expample:
local pic_move_cfg_x = {
when =Transition.StartLayout ,
property = "x",
start = flx*0.040,
}
local pic_move_cfg_y = {
when =Transition.StartLayout ,
property = "y",
start = fly*0.040,
}
-
thanks for your reply....but this is what im trying to do ,,, but cant successfully
make smooth moment back and forth ,, i can do it with a custom .swf flash but their is a "pixel halo" that i cant shake...
when using the animation module it is kind of better ,,, but i get some flashing going on...
here is the code and a vid to show you all...im starting to think the module is flad with it's timing...what do you think
local larrow = fe.add_image("pic/lArrow.png", flx*-0.200, fly*0.450, flw*0.060, flh*0.120 );
local larrow_move_cfg = {
when =Transition.StartLayout ,
property = "x",
start = flx*0.040,
end = flx*0.080,
time = 1000,
loop=true,
}
local larrow2_move_cfg = {
when =Transition.StartLayout ,
property = "x",
start = flx*0.080,
end = flx*0.040,
time = 1000,
delay = 1000,
loop=true,
}
animation.add( PropertyAnimation( larrow, larrow_move_cfg ) );
animation.add( PropertyAnimation( larrow, larrow2_move_cfg ) );
youtube = https://youtu.be/RRuR42URDpA (https://youtu.be/RRuR42URDpA)
note: the delay = 1000,
any help?
-
If i get right what are you trying to do, you only need to do this
arrowLeft = fe.add_image("pic/lArrow.png", flx*-0.200, fly*0.450, flw*0.060, flh*0.120 ),
}
local move_larrow = {
when =Transition.ToNewList ,property = "x", start = flx*0.040, end = flx*0.040, time = 600, loop=true
}
animation.add( PropertyAnimation(arrowLeft, move_larrow ) );
I mean, if you want your arrow goes back and forth, back and forth and keep going, you only need to set the loop = true and the animation module take care of the rest.
-
naa,, what im trying to do is have it smoothly move back and forth,
not move one way and loop , it makes it look choppy ,, but thanks for the reply
you can see in the vid i posted above, near the end its working perfect for a few seconds,,thats what im looking for
smooth bounce.
-
check this thread, there is what i think you are looking for
http://forum.attractmode.org/index.php?topic=1421.msg10151#msg10151
-
Have you tried:
tween = Tween.Linear or tween = Tween.Expo
local larrow = fe.add_image("pic/lArrow.png", flx*-0.200, fly*0.450, flw*0.060, flh*0.120 );
local larrow_move_cfg = {
when =Transition.StartLayout ,
property = "x",
start = flx*0.040,
end = flx*0.080,
time = 1000,
loop=true,
tween = Tween.Expo
}
local larrow2_move_cfg = {
when =Transition.StartLayout ,
property = "x",
start = flx*0.080,
end = flx*0.040,
time = 1000,
delay = 1000,
loop=true,
tween = Tween.Linear
}
animation.add( PropertyAnimation( larrow, larrow_move_cfg ) );
animation.add( PropertyAnimation( larrow, larrow2_move_cfg ) );
-
thanks qqplayer,,,
i think this is as close as ill get it.. the "tween = Tween.Expo" helps smooth it out a bit
so now i can release the theme... thanks again...