idea for doing a sequence ?

Hello everyone

I dry a little
Do you have any idea to do this type this sequence so clean?

side = side1 side = side2 side = side3 side = side4 --on each turn the side must be side + 1 to side4 transition.to(myobject, x = side, y=...)

thanks for your help.

It’s very difficult to understand what you’re trying to do. If you wanted to loop through four different values and apply a transition to an object based on each one:

[lua]

local side = { 50 , 100 , 120 , 200 }

for a = 1 , #side, 1 do

      transition.to(myobject, {x = side[a], time = 400 , delay = 500 * a})

end

[/lua]

It’s very difficult to understand what you’re trying to do. If you wanted to loop through four different values and apply a transition to an object based on each one:

[lua]

local side = { 50 , 100 , 120 , 200 }

for a = 1 , #side, 1 do

      transition.to(myobject, {x = side[a], time = 400 , delay = 500 * a})

end

[/lua]