I really hate doing this:
So why not have a block like this:
It would search in a certain list for an item containing whatever you write in the first braket. Then it would delete that item.
Would someone mind making a suggestion for this? I'm out of votes.
I rewrote my explanation here: http://scratch.mit.edu/forums/viewtopic … 63#p607263
Last edited by iCode-747 (2010-11-25 17:57:44)
Offline
This would really help. I really could have used it in my science fair project.
Offline
12three wrote:
This would really help. I really could have used it in my science fair project.
Exactly.
I find that when I do really list-involved projects, this block could really help me.
Offline
We already have a block like that, unless you mean deleting the WHOLE list. Then, I agree. Also, deleting sprites, etc.
Last edited by yoshidude56 (2010-11-25 17:06:28)
Offline
Yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes yes YES!
Offline
Even better - this block:
(position of [thing] in [List1 v])
Offline
bigreader wrote:
Even better - this block:
(position of [thing] in [List1 v])
Another great block.
Admittedly, these are both fabulous blocks that would work wonderfully if implemented into Scratch. But what would happen if there are two, three, four, sixteen, three hundred instances of [thing]? I'd imagine the "Position of [thing]" could create a variable such as "1, 4, 6, 52, 1269," and I suppose "delete [ ] from list [ ]" could just delete them all.
In short: It's a wonderful suggestion and any gaping holes can easily be sewn up.
Offline
coolstuff wrote:
bigreader wrote:
Even better - this block:
(position of [thing] in [List1 v])Another great block.
Admittedly, these are both fabulous blocks that would work wonderfully if implemented into Scratch. But what would happen if there are two, three, four, sixteen, three hundred instances of [thing]? I'd imagine the "Position of [thing]" could create a variable such as "1, 4, 6, 52, 1269," and I suppose "delete [ ] from list [ ]" could just delete them all.
In short: It's a wonderful suggestion and any gaping holes can easily be sewn up.
How about, location of instance [1] of [thing] in [list v]
Offline
johndo77 wrote:
coolstuff wrote:
bigreader wrote:
Even better - this block:
(position of [thing] in [List1 v])Another great block.
Admittedly, these are both fabulous blocks that would work wonderfully if implemented into Scratch. But what would happen if there are two, three, four, sixteen, three hundred instances of [thing]? I'd imagine the "Position of [thing]" could create a variable such as "1, 4, 6, 52, 1269," and I suppose "delete [ ] from list [ ]" could just delete them all.
In short: It's a wonderful suggestion and any gaping holes can easily be sewn up.How about, location of instance [1] of [thing] in [list v]
That just starts getting confusing! But other than that, yes, it's a wonderful idea. Now, what if there is no instance of [thing] in the list?
Offline
coolstuff wrote:
johndo77 wrote:
coolstuff wrote:
Another great block.
Admittedly, these are both fabulous blocks that would work wonderfully if implemented into Scratch. But what would happen if there are two, three, four, sixteen, three hundred instances of [thing]? I'd imagine the "Position of [thing]" could create a variable such as "1, 4, 6, 52, 1269," and I suppose "delete [ ] from list [ ]" could just delete them all.
In short: It's a wonderful suggestion and any gaping holes can easily be sewn up.How about, location of instance [1] of [thing] in [list v]
That just starts getting confusing! But other than that, yes, it's a wonderful idea. Now, what if there is no instance of [thing] in the list?
It would probably just skip the block.
Offline
johndo77 wrote:
coolstuff wrote:
johndo77 wrote:
How about, location of instance [1] of [thing] in [list v]That just starts getting confusing! But other than that, yes, it's a wonderful idea. Now, what if there is no instance of [thing] in the list?
It would probably just skip the block.
That could cause some errors in the project. Maybe it would return 0 or null?
Offline
Harakou wrote:
johndo77 wrote:
coolstuff wrote:
That just starts getting confusing! But other than that, yes, it's a wonderful idea. Now, what if there is no instance of [thing] in the list?It would probably just skip the block.
That could cause some errors in the project. Maybe it would return 0 or null?
0 would cause problems...
Offline
Support'd
johndo77 wrote:
Harakou wrote:
johndo77 wrote:
It would probably just skip the block.That could cause some errors in the project. Maybe it would return 0 or null?
0 would cause problems...
Just have it report nothing.
Offline
I am interested in this as well.
The other thing I really want to know is..... is there a way to dynamically delete sprintes on the stage with code? In other words make a list that contains references to sprites on the stage, and when you delete the list item, the graphic disappears as well?
Please advise !
Offline