Discuss Scratch

cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

How do I make a list of entries without using the variable list as the final list?
I need a bunch of entries, and you can click on them individually and it asks you a question with a different answer depending on what entry you clicked.
A few catches: I need the list to be scrollable using the mouse/mousepad. I know how to sense scroll wheel movement, but i don't know how to put each entry up and have them move with the scroll wheel. another catch: The list's length will not always be the same. I assume the ideal circumstance is to use a variable list with each entry, and then have the final list take from that list. My end goal is the amount of entries can be edited inside the project, without going into the code at all. This includes adding entries, removing entries, and editing entries. I have seen that clones are the best way (via google ai ) but I have never really used clones. That doesnt mean I am opposed to it.

Thank you so much for helping!

Last edited by cjdudester (Sept. 20, 2026 23:28:06)

scratchdragon999
Scratcher
34 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

how exactly do you want it to work/can you give a project link?
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

No project link to give, this is the first step in my project
It works basically you start the project, you click an entry from the list that will be around 30 entries. The list moves with the scroll wheel. It asks you a question after you click an entry. The question is the same for all entries, but the answer is different.
It isnt as simple as having a sprite for each entry, because i need to be able to add, remove, and change entries with running code, not by modifying code.
The entry name is not predetermined either.
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

BUMP
dem_bot
Scratcher
1000+ posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

You'll want a text engine and keep track of scroll y and have the text engine print every item on a new line, with a starting y offset of scroll y. You can use a check to only print the item if it's actually going to be on screen to improve performance. You'll also want to have a check that if scroll y exceeds limits, it has to be sent back. I would recommend using a stamp based text engine, but that's mainly personal preference (cus i no likey juggling threads around clones)

for the editing, you'll need to keep track of where the cursor is at and what's typed and you'll love there's no backspace and shift support, but I'm sure you'll figure that out
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

dem_bot wrote:

(#5)
You'll want a text engine and keep track of scroll y and have the text engine print every item on a new line, with a starting y offset of scroll y. You can use a check to only print the item if it's actually going to be on screen to improve performance. You'll also want to have a check that if scroll y exceeds limits, it has to be sent back. I would recommend using a stamp based text engine, but that's mainly personal preference (cus i no likey juggling threads around clones)

for the editing, you'll need to keep track of where the cursor is at and what's typed and you'll love there's no backspace and shift support, but I'm sure you'll figure that out


Sorry, i didnt make the editing part clear!
So they way the editing would be done is it would ask you what the entry name is and then what the answer for clicking the entry would be.

Is the best case scenario using an actual list, and pulling from that list? In short i want an variable list but each entry is clickable and does something when you click it. I do not want a thing where you enter the entry number of the entry on the list.

Should I try to use clones? Or would that mess up the broadcasts? (i use a lot of broadcasts)

Thank you!
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

deleted

Last edited by cjdudester (Sept. 15, 2026 15:54:28)

cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

something broke, BUMP
dem_bot
Scratcher
1000+ posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

cjdudester wrote:

Sorry, i didnt make the editing part clear!
So they way the editing would be done is it would ask you what the entry name is and then what the answer for clicking the entry would be.
Is the best case scenario using an actual list, and pulling from that list? In short i want an variable list but each entry is clickable and does something when you click it. I do not want a thing where you enter the entry number of the entry on the list.
Should I try to use clones? Or would that mess up the broadcasts? (i use a lot of broadcasts)
Thank you!
Every broadcast in your entire project should be found in a single centralized script under a when flag clicked block. Any broadcasts sent in a different location shouldn't be broadcasts unless you feel like spending years debugging everything. The only thing broadcasts are good for is controlling update order of scripts in different sprites within a frame.

For the rest of your stuff, I'd recommend using parallel lists, one for what's displayed and one for the action, unless those things are the same, in which case one list would be fine. You'll also want a list of all available actions, unless the actions are similar enough to make a single function handle all of them.

For making each entry do something when you click it, you'll want to detect which entry is clicked. This you can do by: if the mouse is down and the user didn't already click, check if the mouse is on the list somewhere, and if so, use the scroll y and mouse y to determine which entry is being clicked and store that the user clicked something and have a custom block handle the click. When the mouse goes up again, you can set the var back to clickable.
The custom block will take the entry number the user clicked on and look at the action list what should be done. It can then either use that to do something, or look it up in the list of all actions and have an if else tree with custom blocks for the different actions.

Whether you use clones or stamps is mostly personal preference, clones give a slightly higher display resolution, but stamps are a bit easier to work with. For the text engine, doing an erase all, stamp text is abt as easy as doing a create clones for text and have each clone delete itself after 0 seconds.
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

dem_bot wrote:

(#9)

Every broadcast in your entire project should be found in a single centralized script under a when flag clicked block. Any broadcasts sent in a different location shouldn't be broadcasts unless you feel like spending years debugging everything. The only thing broadcasts are good for is controlling update order of scripts in different sprites within a frame.

For the rest of your stuff, I'd recommend using parallel lists, one for what's displayed and one for the action, unless those things are the same, in which case one list would be fine. You'll also want a list of all available actions, unless the actions are similar enough to make a single function handle all of them.

For making each entry do something when you click it, you'll want to detect which entry is clicked. This you can do by: if the mouse is down and the user didn't already click, check if the mouse is on the list somewhere, and if so, use the scroll y and mouse y to determine which entry is being clicked and store that the user clicked something and have a custom block handle the click. When the mouse goes up again, you can set the var back to clickable.
The custom block will take the entry number the user clicked on and look at the action list what should be done. It can then either use that to do something, or look it up in the list of all actions and have an if else tree with custom blocks for the different actions.

Whether you use clones or stamps is mostly personal preference, clones give a slightly higher display resolution, but stamps are a bit easier to work with. For the text engine, doing an erase all, stamp text is abt as easy as doing a create clones for text and have each clone delete itself after 0 seconds.

I am sorry, I do not completely understand what you are talking about. I use broadcasts to control one sprite from another, specifically to tell it when it needs to do something. Am i not supposed to do it this way?

I also need to figure out how to do the list itself. Do you think you could make an example project so i can see exactly what you are saying? If you can, THANK YOU!
dem_bot
Scratcher
1000+ posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

cjdudester wrote:

dem_bot wrote:

–hating on broadcasts–

I am sorry, I do not completely understand what you are talking about. I use broadcasts to control one sprite from another, specifically to tell it when it needs to do something. Am i not supposed to do it this way?

I also need to figure out how to do the list itself. Do you think you could make an example project so i can see exactly what you are saying? If you can, THANK YOU!
the broadcast thing is mainly because they are locally often the simplest option, but quickly snowball into an incomprehensible mess, which is why i don't like using them more than the absolute minimum neccesary. I would much rather do
set [do thing v] to [1]

when green flag clicked
forever
if <(do thing) = [1]> then
set [do thing v] to [0]
do thing
end
end
than
broadcast [do thing v]
when I receive [do thing v]
do thing
because option 1 is more predictable.

as for the rest i was yapping abt, this game: https://scratch.mit.edu/projects/1325072997/ I made a little while ago uses a similar idea to it, so you may be able to take some inspiration from that. My coding style is that everything is in one thread, with every block definition in the column left of the leftmost use of that block.
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

dem_bot wrote:

(#11)

cjdudester wrote:

dem_bot wrote:

–hating on broadcasts–

I am sorry, I do not completely understand what you are talking about. I use broadcasts to control one sprite from another, specifically to tell it when it needs to do something. Am i not supposed to do it this way?

I also need to figure out how to do the list itself. Do you think you could make an example project so i can see exactly what you are saying? If you can, THANK YOU!
the broadcast thing is mainly because they are locally often the simplest option, but quickly snowball into an incomprehensible mess, which is why i don't like using them more than the absolute minimum neccesary. I would much rather do
set [do thing v] to [1]

when green flag clicked
forever
if <(do thing) = [1]> then
set [do thing v] to [0]
do thing
end
end
than
broadcast [do thing v]
when I receive [do thing v]
do thing
because option 1 is more predictable.

as for the rest i was yapping abt, this game: https://scratch.mit.edu/projects/1325072997/ I made a little while ago uses a similar idea to it, so you may be able to take some inspiration from that. My coding style is that everything is in one thread, with every block definition in the column left of the leftmost use of that block.

Yeah that was my idea for improvised broadcasts. Ill happily do that, thanks!
However, could you make a project with an example of the list?
Thanks!
10goto10
Scratcher
1000+ posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

Maybe it's clear to everyone else but I'm not sure what you had in mind and since you don't have a script for us to see or to help with I made my own mock-up of what I think you are asking for. https://snap.berkeley.edu/embed?projectname=Scrolling%20menu%20test&username=10goto10&showTitle=true&showAuthor=true&editButton=true&pauseButton=true

Scrolling is possible. The menu selection will let you replace a text entry but not delete or add. I was just trying to put something as a placeholder and to give a visual to your scrolling question.
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

10goto10 wrote:

(#13)
Maybe it's clear to everyone else but I'm not sure what you had in mind and since you don't have a script for us to see or to help with I made my own mock-up of what I think you are asking for. https://snap.berkeley.edu/embed?projectname=Scrolling%20menu%20test&username=10goto10&showTitle=true&showAuthor=true&editButton=true&pauseButton=true

Scrolling is possible. The menu selection will let you replace a text entry but not delete or add. I was just trying to put something as a placeholder and to give a visual to your scrolling question.


Oh, thank you! This is nearly exactly what i was needing help on!

What I was asking help for was how to do it, as i started but couldnt get past the actual code part. Therefore, i had no code to show.

Mainly there would be only a couple things i would change with what you gave me: the scroll bar; i would make it mouse wheel responsive.
And the editing would be done via entering a dev code (already have that figured out) and then you could change the name / answer to question or instead add/remove entries.

It would probably be along the lines of you enter the code, click buttton 1 to change name or question, and it shows the list. When you click an entry it gives a selection as to which to change. you choose one and you enter the new one.

Button 2 would add an entry. You click it and it prompts you for the name of the entry. Then for the answer to the question.
Button 3 removes entry. You click it, it shows list, you click one to delete it, it confirms.

My end goal is that if something needs to be changed, I don't have to go inside the code to fix it, instead the project can do it itself when you tell it to. This is because i am making this project for people who have never stepped foot inside scratch (i made an ILS, think along those lines) and if someone else is in charge of it then they need to be able to fix it if the answer to an entry is forgotten, etc.

Thank you again for making this demo! Could you possibly try to port it to scratch with the details i listed above? And i will most definitely give credit!
Thank you!!!
10goto10
Scratcher
1000+ posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

cjdudester wrote:

Could you possibly try to port it to scratch with the details i listed above? And i will most definitely give credit!
Thank you!!!
As I was writing this in Snap I was thinking about all of the Scratch “microcode” that would either need to be written or borrowed from someone. Unfortunately there is quite a bit. So finding existing Scratch code to do this would help.

The scroll wheel actually does work in my mockup but I didn’t implement it using the Scratch kludge (I’ll have to look that up).

The displayed text is done with just one Snap block and I didn’t have to care about the clone limit but that will expand into quit a bit of Scratch code. One of the exiting Scratch text engines that use clones could probably be imported to do this. Maybe someone has a suggestion.

It sounds like there will be a list of questions that are matched with the list of text entries.

So, are these list of text entries and lists of questions only to be displayed during some “admin” panel and that the ‘user’ part of the project would just use these lists in some other form? If that’s the case, could your “admins” just use the Scratch import feature of lists and import text files that they make using something outside of Scratch like notepad? I’m just thinking of an alternative because the porting this to Scratch and making it in to a prototype may take some effort.

It would help if anyone knows of a Scratch project that basically works like the model that I wrote.


dem_bot
Scratcher
1000+ posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?


dem_bot wrote:

as for the rest i was yapping abt, this game: https://scratch.mit.edu/projects/1325072997/ I made a little while ago uses a similar idea to it, so you may be able to take some inspiration from that. My coding style is that everything is in one thread, with every block definition in the column left of the leftmost use of that block.

cjdudester wrote:

Yeah that was my idea for improvised broadcasts. Ill happily do that, thanks!
However, could you make a project with an example of the list?
Thanks!
that project was the example, and for your thing you're going to want to have your editing software and stuff instead of the list being for upgrades.
Browsing about a bit, I came across this thingy https://scratch.mit.edu/projects/907632628/ which looks a lot better, but I didn't make it so idk if it's easy to modify for your purposes.
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

dem_bot wrote:

(#16)

dem_bot wrote:

as for the rest i was yapping abt, this game: https://scratch.mit.edu/projects/1325072997/ I made a little while ago uses a similar idea to it, so you may be able to take some inspiration from that. My coding style is that everything is in one thread, with every block definition in the column left of the leftmost use of that block.

cjdudester wrote:

Yeah that was my idea for improvised broadcasts. Ill happily do that, thanks!
However, could you make a project with an example of the list?
Thanks!
that project was the example, and for your thing you're going to want to have your editing software and stuff instead of the list being for upgrades.
Browsing about a bit, I came across this thingy https://scratch.mit.edu/projects/907632628/ which looks a lot better, but I didn't make it so idk if it's easy to modify for your purposes.

uh with 16 sprites, 286 scripts, and 7642 blocks, i do not think i can use that lol
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

@10goto10

Yes and no. The “admin” panel allows the “admin” to edit, add, remove, and change the correct response to the question. The player just clicks an entry and types the response. The question is the same for everyone and will not need to be changed, but the correct response itself will change. The player cannot edit, add, remove, or change correct responses. Cloud variables are NOT used in this at all. Nobody else can see what the player inputs, only what the correct response is, which can be viewed only within the project script. I hope this helps!


For the mouse wheel scrolling, this is what i did:

when [up arrow v] key pressed
if <not <key [up arrow v] pressed?>> then
set [scrolling? v] to [true]
wait (0.1) secs
set [scrolling? v] to [false]
end

when green flag clicked
forever
if <(scrolling?) = [true]> then
scroll
end
end


edit: STUPID FILTER KEPT DENYING IT

Last edited by cjdudester (Sept. 17, 2026 15:48:11)

10goto10
Scratcher
1000+ posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

cjdudester wrote:

uh with 16 sprites, 286 scripts, and 7642 blocks, i do not think i can use that lol
That's what I was afraid of and why I said it would take a large amount of Scratch microcode.

I made another mock-up that is written in Scratch instead of snap. https://scratch.mit.edu/projects/1382290086/
In this project I am using the screen Scratch List watcher for a list, which I don't think you wanted, but it is scrollable list using the scroll wheel, which is something you wanted and each displayed entry has a corresponding button to click.

One “admin” function is implemented: “Press “1” to enter a mock-up of an admin mode where you can delete one of the list items. ”

It's a fairly simple project so I believe it will be easy to add quiz and admin functions. If you want to avoid Scratch scripting complexity then you may need to compromise and have your project use the list display.

(BTW, scrolling only seems to work well in full screen mode. In the project screen using the scroll wheel causes the browser window to also scroll.)
cjdudester
Scratcher
93 posts

[STILL NEED HELP] How to make scrolling lists of things, without using the list block?

10goto10 wrote:

(#19)

cjdudester wrote:

uh with 16 sprites, 286 scripts, and 7642 blocks, i do not think i can use that lol
That's what I was afraid of and why I said it would take a large amount of Scratch microcode.

I made another mock-up that is written in Scratch instead of snap. https://scratch.mit.edu/projects/1382290086/
In this project I am using the screen Scratch List watcher for a list, which I don't think you wanted, but it is scrollable list using the scroll wheel, which is something you wanted and each displayed entry has a corresponding button to click.

One “admin” function is implemented: “Press “1” to enter a mock-up of an admin mode where you can delete one of the list items. ”

It's a fairly simple project so I believe it will be easy to add quiz and admin functions. If you want to avoid Scratch scripting complexity then you may need to compromise and have your project use the list display.

(BTW, scrolling only seems to work well in full screen mode. In the project screen using the scroll wheel causes the browser window to also scroll.)

Scrolling only in full screen mode isnt a problem for me at all, as i would keep the project in full screen mode when i use it. This is for my real life friends, so it wouldnt be a problem.

What you have made was very similiar to what i had wanted.
Before i make a decision, i have a question:
What would you estimate the block count and sprites be for simply the scrolling mechanism itself? Not including the admin mode, just the scrolling list that asks a question when you click it. Not the Scratch List, but the custom one.

Powered by DjangoBB