nibylev wrote:Thanks, although I don't get one thing: the value a.table[1] is not nil, so I would expect my code to work. How do you mean that value is nil?
nibylev wrote:Thanks, although I don't get one thing: the value a.table[1] is not nil, so I would expect my code to work. How do you mean that value is nil?
a.table[1] is not nil, but table[1] is nil (table is a global variable that contains helper functions, but not the key 1)
tweens object.param from current value to value specified in {}. What is that thing I am missing?
you cannot have a key like "subvalue[value]" or "key.key". The third argument is just a lua table itself. To access a nested property you have to give it a nested "target table", as seen in the documentation aswell.
tweenme = {}
tweenme.table = {a=3}
tweenme["table.a"] = 3
fg.timer:tween(1, tweenme, {table = {a=2}}) -- will tween the first value
fg.timer:tween(1, tweenme, {["table.a"] = 2}) -- will tween the second value