Thanks this has been a great help today, i have been able to edit it to work with one of code but when i change the process it does not work as expected.
The code on the left works but the code on the right fail to return an output, but both codes work as expected when coded outside the loop.
I need the code logic on the right to work as the move is only a simple example, when i get this to work i can add more complex transformations.
Broken Loop Code
def move_cubes_shift(cubes:var){
return = [Imperative]
{
cnt = List.Count(cubes);
ind = 0…cnt-2…1;
dist = {5,10,15};
for (i in ind)
{
// Portion of Code Changed//
cubes_A = List.TakeItems(cubes,i+1);
cubes_B = List.DropItems(cubes,i+1);
move_cube = cubes_B.Translate(Vector.XAxis(),dist[i]);
cubes = List.Join({cubes_A,move_cube});
// Portion of Code Changed//
}
return = cubes;
}
};
Thanks