Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: Oomek on February 28, 2017, 10:37:12 AM
-
I found out that the properties used in animation module do not accept variables as a value for start and end for example:
when = Transition.ToNewSelection ,property = "y", start = 200 * direction, end = 0, delay = 0, time = 500
When the variable "direction" changes it does not affect the starting position of the animation, is it by design or a bug?
-
It would set it, but you have to remember that when you assign variables in the animation properties, that value is assigned at that moment, not when the animation occurs. If the value changes, it would not be updated at a later time.. If you need it set when the animation starts or is running, you can use the onInit, onStart, onUpdate and other functions to set values when necessary.. does that make sense?
https://raw.githubusercontent.com/liquid8d/attract-extra/master/modules/animate.nut