286
Scripting / Re: Animate module BUG: linear tween not so linear
« on: February 28, 2017, 04:10:54 PM »
will do
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
"linear": function (t, b, c, d) { ::print(t+"\n"); return c * t / d + b; }
fe.load_module( "animate" );
local rect = fe.add_image("white_square_32x1080.png")
local move_rect = {
when = Transition.ToNewSelection, property = "x", start = 0, end = 1920 - 32, time = 75, tween = "linear"
}
local anim_rect = PropertyAnimation( rect, move_rect )
animation.add( anim_rect )
when = Transition.ToNewSelection ,property = "y", start = 200 * direction, end = 0, delay = 0, time = 500
onUpdate = function ( anim ) { if ("last" in anim.config) { debugText.msg = anim.config.last.x } },
but .last does not exist, I need that for the situation when I play a new animation but the old one hasn't finished, so I need to know the current position of the object.
local move_gameListBoxFadeIn = {
onStart = function( anim ) { if ( listbox_hidden == true) { time = 250; listbox_hidden = false; }
else { time = 0; } },
wait = true,
when = Transition.ToNewSelection, property = "x", start = flx*0.822, end = flx*0.51, tween = Tween.Expo
}
local move_gameListBoxFadeOut = {
onStop = function( anim ) { listbox_hidden = true },
when = Transition.ToNewSelection, property = "x", start = flx*0.51, end = flx*0.822, time = 250, delay=2000, tween = Tween.Expo
}
open your attract.cfg file in a text editor and change the "accelerate_selection" setting to false. that will disable the selection from speeding up
you can also edit the "selection_speed_ms" setting in this file to change the speed of selection changes when a key is held down