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

#1 2010-05-31 11:54:24

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Questions for NXIII

How do I turn a block I made in Panther into a normal block in Scratch for a Mod?

No answer

How do you add more tabs like pen and control? Tell us once and for all.

No answer

Climber59 asked:
How does the [replace costume() with []] block work?

No answer

Last edited by johnnydean1 (2010-05-31 12:03:30)


You can now reach me on Twitter @johnnydean1_

Offline

 

#2 2010-05-31 12:00:13

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: Questions for NXIII

Mind if I add a question of my own?

How does the [replace costume() with []] block work? I only care about the import function, not paint, camera, or stage.


Check out my projects if you have a chance.

Offline

 

#3 2010-05-31 12:03:38

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Questions for NXIII

added


You can now reach me on Twitter @johnnydean1_

Offline

 

#4 2010-05-31 12:08:24

TheGameMaster1231
Scratcher
Registered: 2009-07-24
Posts: 1000+

Re: Questions for NXIII

climber59 wrote:

How does the [replace costume() with []] block work? I only care about the import function, not paint, camera, or stage.

I Can Answer That. It Mainly Works Like The List Block, [replace item (1) of [list] with [thing] ] Except It Uses Costumes, Camera, Import, etc.

Offline

 

#5 2010-05-31 12:21:09

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: Questions for NXIII

That doesn't help me because I want to make a block that has a space for you to define the filepath to an pic but no matter what I try it doesn't work.
Basically I need to know how the import part works, not the replace.


Check out my projects if you have a chance.

Offline

 

#6 2010-05-31 13:50:54

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Questions for NXIII

1: You shouldn't be stealing from Panther in the first place,

2: He's already told us lots of times, you just aren't looking hard enough,

3: (A) You shouldn't be planning to steal that block either (B) Why should you care? (C) I don't truly know, but I think it works the same way as you dragging them to different places with the actual mouse.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#7 2010-05-31 13:55:53

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Questions for NXIII

climber59 wrote:

That doesn't help me because I want to make a block that has a space for you to define the filepath to an pic but no matter what I try it doesn't work.
Basically I need to know how the import part works, not the replace.

Take a look at the source code for panther. That might help.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#8 2010-05-31 14:28:42

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

Re: Questions for NXIII

1. CYOB? If so, just make a method with the arguments defined, copy your code, and insert the blockSpec in the desired place.

2. henley is right.

3. it takes a symbol and an integer as arguments and replaces the costume at the given index with a form retrieved by comparing the symbol with some constants


nXIII

Offline

 

#9 2010-05-31 15:09:40

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: Questions for NXIII

No answers have helped me, I'm trying to make a block that does the same thing except you type in the filepath, so you don't have to use the dialog. Just it doesn't work when I try it because I don't understand most of the code. This is what I want, http://img64.imageshack.us/img64/5609/block.gif

Also I am not stealing anything, it's for my own use and/or a Panther project I may upload.

Last edited by climber59 (2010-05-31 15:10:46)


Check out my projects if you have a chance.

Offline

 

#10 2010-05-31 15:12:54

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Questions for NXIII

nXIII wrote:

1. CYOB? If so, just make a method with the arguments defined, copy your code, and insert the blockSpec in the desired place.

I tried it but its like this
                             __
NAME $variable$     |__|

|t1 t2 t3 t4|
CODE



So when I put it in a mod it does not work.


You can now reach me on Twitter @johnnydean1_

Offline

 

#11 2010-05-31 15:17:55

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

Re: Questions for NXIII

johnnydean1 wrote:

nXIII wrote:

1. CYOB? If so, just make a method with the arguments defined, copy your code, and insert the blockSpec in the desired place.

I tried it but its like this
                             __
NAME $variable$     |__|

|t1 t2 t3 t4|
CODE



So when I put it in a mod it does not work.

What ARE you talking about...?


nXIII

Offline

 

#12 2010-05-31 15:24:13

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Questions for NXIII

Ok ill post the code:

Name:Get $Variable$ from Mesh

Code:
    |t1 t2 t3 t4 |
  (t2 _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ 0].
    t2 scratchServer
        ifNotNil:
            [t3 _ t2 scratchServer sensorValueFor: t1.
            t3 ifNotNil: [^ t3]].
    'tilt' = t1 ifTrue: [^ WeDoPlugin tilt].
    'distance' = t1 ifTrue: [^ WeDoPlugin distance].
    t4 _ t2 sensorBoard.
    t4 tryToOpenPort ifFalse: [^ 0].
    ^ t4 sensor: (self indexForSensorName: t1)


You can now reach me on Twitter @johnnydean1_

Offline

 

#13 2010-05-31 16:07:22

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Questions for NXIII

johnnydean1 wrote:

Ok ill post the code:

Name:Get $Variable$ from Mesh

Code:
    |t1 t2 t3 t4 |
  (t2 _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ 0].
    t2 scratchServer
        ifNotNil:
            [t3 _ t2 scratchServer sensorValueFor: t1.
            t3 ifNotNil: [^ t3]].
    'tilt' = t1 ifTrue: [^ WeDoPlugin tilt].
    'distance' = t1 ifTrue: [^ WeDoPlugin distance].
    t4 _ t2 sensorBoard.
    t4 tryToOpenPort ifFalse: [^ 0].
    ^ t4 sensor: (self indexForSensorName: t1)

Why did they have to make smalltalk/squeak so confusing...  hmm


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#14 2010-05-31 16:15:16

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

Re: Questions for NXIII

johnnydean1 wrote:

Ok ill post the code:

Name:Get $Variable$ from Mesh

Code:
    |t1 t2 t3 t4 |
  (t2 _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ 0].
    t2 scratchServer
        ifNotNil:
            [t3 _ t2 scratchServer sensorValueFor: t1.
            t3 ifNotNil: [^ t3]].
    'tilt' = t1 ifTrue: [^ WeDoPlugin tilt].
    'distance' = t1 ifTrue: [^ WeDoPlugin distance].
    t4 _ t2 sensorBoard.
    t4 tryToOpenPort ifFalse: [^ 0].
    ^ t4 sensor: (self indexForSensorName: t1)

t1 is already defined, why did you put it in your temp vars section?


nXIII

Offline

 

#15 2010-05-31 16:18:36

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Questions for NXIII

nXIII, could you PLEASE make my laser thing!


PLEASE!!!


http://i46.tinypic.com/dw7zft.png

Offline

 

#16 2010-05-31 16:30:32

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Questions for NXIII

nXIII wrote:

johnnydean1 wrote:

Ok ill post the code:

Name:Get $Variable$ from Mesh

Code:
    |t1 t2 t3 t4 |
  (t2 _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ 0].
    t2 scratchServer
        ifNotNil:
            [t3 _ t2 scratchServer sensorValueFor: t1.
            t3 ifNotNil: [^ t3]].
    'tilt' = t1 ifTrue: [^ WeDoPlugin tilt].
    'distance' = t1 ifTrue: [^ WeDoPlugin distance].
    t4 _ t2 sensorBoard.
    t4 tryToOpenPort ifFalse: [^ 0].
    ^ t4 sensor: (self indexForSensorName: t1)

t1 is already defined, why did you put it in your temp vars section?

So how do I do it?


You can now reach me on Twitter @johnnydean1_

Offline

 

#17 2010-05-31 17:37:29

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

Re: Questions for NXIII

SeptimusHeap wrote:

nXIII, could you PLEASE make my laser thing!


PLEASE!!!

Here: the laser thing


nXIII

Offline

 

#18 2010-05-31 17:43:56

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Questions for NXIII

Nice laser!


You can now reach me on Twitter @johnnydean1_

Offline

 

#19 2010-05-31 17:50:22

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Questions for NXIII

1. Steal it!

Offline

 

#20 2010-05-31 17:52:16

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Questions for NXIII

No I Made It!


You can now reach me on Twitter @johnnydean1_

Offline

 

#21 2010-05-31 21:26:58

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: Questions for NXIII

johhnydean1 wrote:

Questions for nXIII

I see that you're being very blunt with said request.

Not just questions, but questions for a particular person.

All Hail nXIII!

RAAAAH RAAAAAH


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#22 2010-06-01 03:17:03

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Questions for NXIII

Yes as with question no.1 he is the only 1 who can help


You can now reach me on Twitter @johnnydean1_

Offline

 

#23 2010-06-01 14:20:15

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

Re: Questions for NXIII

johnnydean1 wrote:

Yes as with question no.1 he is the only 1 who can help

But I don't even know what number one MEANS!


nXIII

Offline

 

#24 2010-06-01 14:34:37

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Questions for NXIII

Ok then I posted the code earlier, so what do I do to put it in my mod!


You can now reach me on Twitter @johnnydean1_

Offline

 

#25 2010-06-01 15:56:49

Zorbak42
Scratcher
Registered: 2009-01-27
Posts: 100+

Re: Questions for NXIII

@JD1: To convert a CYOB block to a block in your mod, you make a method like this:
whatever you want the method name to be here(if there are any arguments, like $Variable$ in the code you posted, put in the following, otherwise, skip it): t1 (if there are multiple arguments, follow this with more text, then put :, then t2, if there are more, more text, :, t3, ect. here's an example) andEatCheese: t2
put your CYOB code here then right click, accept and if it asks, enter your initials. Then navigate to block specs and add: ('name of block, but replace the $Variable$ with %v (I think that's it, or maybe it's %V)' #type of block #whatever your names the method, like examlesAreFun: (notice you don't put t1 in the block specs) andEatCheese: ), right click and accept.  big_smile  Hooray!

Offline

 

Board footer