Analyzing that line you highlighted, this time in the first sequence, there is being stored in the new_sequence array, the order of the frames based on the variable seq1 and the order of the initial frames. You used (-1) to match the frame number since it starts at 0, right? Then, the value of the new_sequence array is passed to another variable (new_result).
That's correct
You are making progress but you're still missing the most important which is the thing that confused you as you try to copy my code exactly.
This line of code is your issue as you still didn't understand the concept:
Because my "seq2" starts empty = ""
So repeat 4 times:
First Loopindex:
And I add the First number to "seq2" -------- Example = 2
So to set the New Value in the Array Sequence I need the last number Added in "seq2" that's why I use -------------- int(right(Seq2,1))
This will Pick = 2
So we set the New Value at index = (2) -1 to match the Array index as it starts (from = 0) as you found out
===========================================
Second Loopindex:
And I add the second number to "seq2" -------- Example = 1
So to set the New Value in the Array Sequence I need the last number Added in "seq2" that's why I use -------------- int(right(Seq2,1))
This will Pick = 1
So we set the New Value at index = (1) -1 to match the Array index again
====================================================================
Third Loopindex:
And I add the third number to "seq2" -------- Example = 4
So to set the New Value in the Array Sequence I need the last number Added in "seq2" that's why I use -------------- int(right(Seq2,1))
This will Pick = 4
So we set the New Value at index = (4) -1 to match the Array index again
=================================================
Four Loopindex:
And I add the Fourth number to "seq2" -------- Example = 3
So to set the New Value in the Array Sequence I need the last number Added in "seq2" that's why I use -------------- int(right(Seq2,1))
This will Pick = 3
So we set the New Value at index = (3) -1 to match the Array index again
=================================================================
So far we have the Sequence modifier = 2143
Now, where is your problem that I want you to find out?
If you look closely you cannot use my code:
int(right(Seq2,1))
Because you already have the full Number = "2143" created Right?
So instead you need to loop from the first number to the last one in order, the same way I did but with your own code, that's the only thing you need.
I create the number on the fly and I pick on each loopindex the last number added but you already have your full number created so you should just loop through your "seq2" number to pick one by one in order.
2
1
4
3
the same logic goes for (seq1/seq2/seq3)
So in truth, the concept was just to loop through the Sequence number in order that's all, the only difference is I add the number and pick the last number and you will loop through yours without picking the last number and instead just do it by index order.
===========================================================
So finally you shouldn't use:
int(right(Seq2,1)) -1
Should use something like:
mid(sq1, loopindex, 1) -1
Or pick the code you are more comfortable with as they are many ways you could do it.