This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-05-07 19:33:25

poppyseeds
Scratcher
Registered: 2009-02-28
Posts: 24

How would one make a working Cblock

alrighty if your name is nxiii you have probably figured out that I'm making a mod. I am not some reject thats just stealing other peoples blocks and throwing it together. I have actually been researching squeak and smalltalk for maybe 2 weeks now looking at how it works and making small blocks here and there. as nxiii said on my last forum post

nXIII wrote:

Blocks like 'doUntil' are called special-form blocks -- they have custom (or special) evaluation procedures. These are actually defined in ScratchProcess, not ScriptableScratchMorph

a Cblock is a special-form block and they have special evaluation procedures. I was wondering if anyone might know how you make such special procedures so that one could make a working Cblock. thanks for all your help.

Last edited by poppyseeds (2010-05-07 19:34:53)


http://nyxscratch.webs.com/

Offline

 

#2 2010-05-07 19:36:56

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: How would one make a working Cblock

Okay, blockSpec time:
#('string w/ args (if any, not including c)' c someSelectorNoArgs)
the selector has no arguments, something like 'doUntil' or 'doReturn'. The c is for "c-block".
Next, go to ScratchProcess's private-special forms and add your method selector there.

I will give you a more detailed help on the method if you tell me what your block is; it's really very case-specific.


nXIII

Offline

 

#3 2010-05-07 20:32:12

poppyseeds
Scratcher
Registered: 2009-02-28
Posts: 24

Re: How would one make a working Cblock

ok so you want me to go to block specs in scriptablescratchmorph and put in a block string. my block string would be ('if %b then do until %b' #c #ifUntil) ok then I * my method to the scratch process's my this you mean I goto instalize in scratch process's and type in my block command which is ifUntil? my Cblocks that I'm really playing to make are mostly combination of other Cblocks


http://nyxscratch.webs.com/

Offline

 

#4 2010-05-07 20:39:40

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: How would one make a working Cblock

poppyseeds wrote:

ok so you want me to go to block specs in scriptablescratchmorph and put in a block string. my block string would be ('if %b then do until %b' #c #ifUntil) ok then I * my method to the scratch process's my this you mean I goto instalize in scratch process's and type in my block command which is ifUntil? my Cblocks that I'm really playing to make are mostly combination of other Cblocks

My advice: don't bother wasting your time making a new (very space-consuming) c-block that can easily be accomplished with a few other blocks. Make new c blocks for things that are COMPLETELY new and MUST contain code, such as Panther's
[ do with camera open]
||
[_____________________]
block.

Last edited by nXIII (2010-05-07 20:39:46)


nXIII

Offline

 

#5 2010-05-07 21:37:08

poppyseeds
Scratcher
Registered: 2009-02-28
Posts: 24

Re: How would one make a working Cblock

I have specific reasons for what I'm doing. unlinke panther Nyx isn't so much a beefed up scratch its more of a specialized thing. so if you wouldn't mind could you just help me  smile


http://nyxscratch.webs.com/

Offline

 

#6 2010-05-07 21:38:55

poppyseeds
Scratcher
Registered: 2009-02-28
Posts: 24

Re: How would one make a working Cblock

also what your implying is that I should take blocks from panther, which I would rather avoid the only thing I've used so far that I think id from panther is some mesh stuff but we have been coding most of it out selves.


http://nyxscratch.webs.com/

Offline

 

#7 2010-05-07 21:45:21

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: How would one make a working Cblock

poppyseeds wrote:

also what your implying is that I should take blocks from panther, which I would rather avoid the only thing I've used so far that I think id from panther is some mesh stuff but we have been coding most of it out selves.

not really, that's not what I'm implying....

poppyseeds wrote:

I have specific reasons for what I'm doing. unlinke panther Nyx isn't so much a beefed up scratch its more of a specialized thing. so if you wouldn't mind could you just help me  smile

Um.. what reasons?


nXIII

Offline

 

#8 2010-05-07 21:47:05

poppyseeds
Scratcher
Registered: 2009-02-28
Posts: 24

Re: How would one make a working Cblock

mostly gaming I'd rather have easier simplified blocks to get things done alot of blocks I'm taking out to make room for operators control and sensing blocks im adding.


http://nyxscratch.webs.com/

Offline

 

Board footer