Discuss Scratch

powerpoint56
Scratcher
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.

Last edited by powerpoint56 (July 8, 2013 21:59:07)



Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
powerpoint56
Scratcher
1000+ posts

Need help with Scratch mod

bump


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
powerpoint56
Scratcher
1000+ posts

Need help with Scratch mod

bump


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
powerpoint56
Scratcher
1000+ posts

Need help with Scratch mod

bump


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
davidkt
Scratcher
1000+ posts

Need help with Scratch mod

bump

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
powerpoint56
Scratcher
1000+ posts

Need help with Scratch mod

bump


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
djdolphin
Scratcher
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
Scratcher
1000+ posts

Need help with Scratch mod

djdolphin wrote:

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.
Ah. I never knew about that method. I'll try it, thanks.


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
powerpoint56
Scratcher
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?


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
shadowmouse
Scratcher
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.

I'm making a game! It's a old-metroid/mega man esque side scroller/shooter. If your interested in anything from drawing to sounds, please message on one of my projects!
djdolphin
Scratcher
1000+ posts

Need help with Scratch mod

powerpoint56 wrote:

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?
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:
	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
Scratcher
100+ posts

Need help with Scratch mod

djdolphin wrote:

powerpoint56 wrote:

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?
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:
	hasLists _ self listVarNames size > 0.
(stage _ self ownerThatIsA: ScratchStageMorph) ifNotNil: [
stage listVarNames size > 0 ifTrue: [hasLists _ true]].
hasLists ifFalse: [^ self].
or put the code for the cloud list blocks inside the last square brackets to avoid changing other things.

I'm making a game! It's a old-metroid/mega man esque side scroller/shooter. If your interested in anything from drawing to sounds, please message on one of my projects!
powerpoint56
Scratcher
1000+ posts

Need help with Scratch mod

Alright. I'll try this a bit later. Thanks!


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
powerpoint56
Scratcher
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)



Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
powerpoint56
Scratcher
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!


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
shadowmouse
Scratcher
100+ posts

Need help with Scratch mod

powerpoint56 wrote:

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)
Glad I could actually give some help to someone for once, rather than jut getting it.

I'm making a game! It's a old-metroid/mega man esque side scroller/shooter. If your interested in anything from drawing to sounds, please message on one of my projects!
powerpoint56
Scratcher
1000+ posts

Need help with Scratch mod

shadowmouse wrote:

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


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
powerpoint56
Scratcher
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.


Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)
shadowmouse
Scratcher
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.

I'm making a game! It's a old-metroid/mega man esque side scroller/shooter. If your interested in anything from drawing to sounds, please message on one of my projects!
powerpoint56
Scratcher
1000+ posts

Need help with Scratch mod

shadowmouse wrote:

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.
Yeah, I'll do that.

Edit: Added it in.

Last edited by powerpoint56 (July 12, 2013 22:17:46)



Explore, my Scratch mod | Car Crash | My projects | (image by @MicroMacro)

Powered by DjangoBB