Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Merge and Sort Two Lists to One
- scanredpitches
-
17 posts
Merge and Sort Two Lists to One
Um, so I kind of found myself in this situation where I have two lists that throughout the game, certain pieces of these two lists need to be put into another list (which is kind of easy) throughout the game, but sorting them is kind of a hassle. Can I get some help please?
- GrayCat144
-
100+ posts
Merge and Sort Two Lists to One
You mean you want to sort a list from least to greatest?
- scanredpitches
-
17 posts
Merge and Sort Two Lists to One
Actually, I want it greatest to least. I want the last list to sort itself whenever it gets a new thing inside it. You mean you want to sort a list from least to greatest?
- GrayCat144
-
100+ posts
Merge and Sort Two Lists to One
Last edited by GrayCat144 (Aug. 10, 2025 21:37:10)
- scanredpitches
-
17 posts
Merge and Sort Two Lists to One
Here's my list sorting block.Thank you, this is exactly what I needed.
- scanredpitches
-
17 posts
Merge and Sort Two Lists to One
Here's my list sorting block.Thank you for the assistance, but now, if there was a set of names to go with the numbers, I would want to sort the names in the same order as the numbers. How would I do that?
- GrayCat144
-
100+ posts
Merge and Sort Two Lists to One
I'll try to make that for you.Here's my list sorting block.Thank you for the assistance, but now, if there was a set of names to go with the numbers, I would want to sort the names in the same order as the numbers. How would I do that?
- GrayCat144
-
100+ posts
Merge and Sort Two Lists to One
Done! It's in the same project as my original list sorting block.Here's my list sorting block.Thank you for the assistance, but now, if there was a set of names to go with the numbers, I would want to sort the names in the same order as the numbers. How would I do that?
- 10goto10
-
1000+ posts
Merge and Sort Two Lists to One
Just FYI, GrayCat144’s solution won’t work if two numbers are duplicated in the list. You didn’t share a link to your project so it’s hard to know if that will be an issue or not for you.
- scanredpitches
-
17 posts
Merge and Sort Two Lists to One
There is only one instance of it, thank you for telling me. Just FYI, GrayCat144’s solution won’t work if two numbers are duplicated in the list. You didn’t share a link to your project so it’s hard to know if that will be an issue or not for you.
- scanredpitches
-
17 posts
Merge and Sort Two Lists to One
Thank you so much! This worked, except there is a single instance of a duplicate number with two different names, and in this case, S comes before M, so, reverse alphabetical order. Thanks for the hard work you are putting into this!Done! It's in the same project as my original list sorting block.Here's my list sorting block.Thank you for the assistance, but now, if there was a set of names to go with the numbers, I would want to sort the names in the same order as the numbers. How would I do that?
- Discussion Forums
- » Help with Scripts
-
» Merge and Sort Two Lists to One