Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Need help with Scratch mod
- powerpoint56
-
1000+ posts
Need help with Scratch mod
In my mod, I want to add cloud lists to the Variables category. I don't want to have the cloud list blocks be with the normal List blocks, I want them after the List blocks and always showing when you go to the Variables category.
How can I do this? Thanks.
How can I do this? Thanks.

Last edited by powerpoint56 (July 8, 2013 21:59:07)
- djdolphin
-
1000+ posts
Need help with Scratch mod
It has something to do with Scratch-Objects –> ScriptableScratchMorph –> blocks –> variablesPage. You could probably just copy the code for adding the ‘new list’ button, ‘delete list’ button, and list blocks, and change it to ‘new cloud list’, ‘delete cloud list’, and make it add the cloud list blocks instead.
Last edited by djdolphin (July 9, 2013 01:46:58)
- powerpoint56
-
1000+ posts
Need help with Scratch mod
Scratch-Objects –> ScriptableScratchMorph –> blocks –> variablesPage. You could probably just copy the code for adding the ‘new list’ button, ‘delete list’ button, and list blocks, and change it to ‘new cloud list’, ‘delete cloud list’, and make it add the cloud list blocks instead.Ah. I never knew about that method. It has something to do with

- powerpoint56
-
1000+ posts
Need help with Scratch mod
Well, I think it would work, but I'm trying to make it so the cloud list blocks show up every time, not only when a “make cloud list” button was pressed. How could I do that?
- shadowmouse
-
100+ posts
Need help with Scratch mod
I can't look into it at the moment, but I imagine it'll say either in the above method or in one near it, (they're usually helpfully named) about which sections to hide from which button. You could probably edit the apropriate method to include exceptions. Or just make all variables and listst created by script blocks and get rid of the buttons.
- djdolphin
-
1000+ posts
Need help with Scratch mod
In addGenericListBlocksTo:y:, there's code that checks if any lists have been made, and if none have been made, it will return self instead of adding the blocks. When you made the code for making the cloud list blocks and buttons, you can probably just remove this: Well, I think it would work, but I'm trying to make it so the cloud list blocks show up every time, not only when a “make cloud list” button was pressed. How could I do that?
hasLists _ self listVarNames size > 0.
(stage _ self ownerThatIsA: ScratchStageMorph) ifNotNil: [
stage listVarNames size > 0 ifTrue: [hasLists _ true]].
hasLists ifFalse: [^ self].
Last edited by djdolphin (July 9, 2013 15:25:18)
- shadowmouse
-
100+ posts
Need help with Scratch mod
or put the code for the cloud list blocks inside the last square brackets to avoid changing other things.In addGenericListBlocksTo:y:, there's code that checks if any lists have been made, and if none have been made, it will return self instead of adding the blocks. When you made the code for making the cloud list blocks and buttons, you can probably just remove this: Well, I think it would work, but I'm trying to make it so the cloud list blocks show up every time, not only when a “make cloud list” button was pressed. How could I do that?hasLists _ self listVarNames size > 0.
(stage _ self ownerThatIsA: ScratchStageMorph) ifNotNil: [
stage listVarNames size > 0 ifTrue: [hasLists _ true]].
hasLists ifFalse: [^ self].
- powerpoint56
-
1000+ posts
Need help with Scratch mod
Alright. I'll try this a bit later. Thanks! 

- powerpoint56
-
1000+ posts
Need help with Scratch mod
shadowmouse and djdolphin - Thank you so much!
I had time to work with your suggestions today and now the cloud list blocks show up in the right place. I'll add your username to the credits, shadowmouse.
(yours is already in from earlier, djdolphin)


Last edited by powerpoint56 (July 10, 2013 21:19:23)
- powerpoint56
-
1000+ posts
Need help with Scratch mod
Alright, the mod's good to go (no more problems) except for one more thing. Can someone help me? I posted on the Explore forum topic here. Thanks! 

- shadowmouse
-
100+ posts
Need help with Scratch mod
Glad I could actually give some help to someone for once, rather than jut getting it. shadowmouse and djdolphin - Thank you so much!I had time to work with your suggestions today and now the cloud list blocks show up in the right place. I'll add your username to the credits, shadowmouse.
(yours is already in from earlier, djdolphin)

- powerpoint56
-
1000+ posts
Need help with Scratch mod
Yeah. I need to help someone too; right now it's just like, “I need help with my mod, my mod, my mod…”. Glad I could actually give some help to someone for once, rather than jut getting it.

- powerpoint56
-
1000+ posts
Need help with Scratch mod
By the way, I just decided to group cloud lists with lists. Explore 1.3 has lists always showing on the variables page because you can make a list using a block, so both cloud lists and lists always show up.
- shadowmouse
-
100+ posts
Need help with Scratch mod
Could you make variables do the same, I'm sure it's on the block library somewhere? That pesky make a variable button can be annoying. You'd have to have make a global variable and make a local variable blocks or you could put it as a dropdown if you wanted.
- powerpoint56
-
1000+ posts
Need help with Scratch mod
Yeah, I'll do that. Could you make variables do the same, I'm sure it's on the block library somewhere? That pesky make a variable button can be annoying. You'd have to have make a global variable and make a local variable blocks or you could put it as a dropdown if you wanted.

Edit: Added it in.
Last edited by powerpoint56 (July 12, 2013 22:17:46)
- Discussion Forums
- » Advanced Topics
-
» Need help with Scratch mod