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

#851 2010-04-11 13:36:55

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

Re: Panther development thread

Sperry wrote:

Try this:

BlockSpec:

Code:

('average of numbers in %L' #r #listAverage 'list')

listaverage:

Code:

listAverage 
    | t1 t2 t3 t4 t5 t6 |
    t2 _ t1 lineCount.
    t6 _ t1 lineCount.
    t3 _ 0.
    t4 _ 1.
    [t2 >= 0]
        whileTrue: 
            [t2 _ t2 - 1.
            t3 _ t3 + self getLine: (self lineNum: t4 forList: t1)
                        ofList: t1.
            t4 _ t4 + 1].
    t5 _ t3 / t6.
    ^ t5

You had no value to pass through.

What did you do other than t1? T1 is already defined.


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

Offline

 

#852 2010-04-11 13:38:02

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

Re: Panther development thread

T1 is the list.


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

Offline

 

#853 2010-04-11 13:38:06

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

Sperry wrote:

Try this:

BlockSpec:

Code:

('average of numbers in %L' #r #listAverage 'list')

listaverage:

Code:

listAverage 
    | t1 t2 t3 t4 t5 t6 |
    t2 _ t1 lineCount.
    t6 _ t1 lineCount.
    t3 _ 0.
    t4 _ 1.
    [t2 >= 0]
        whileTrue: 
            [t2 _ t2 - 1.
            t3 _ t3 + self getLine: (self lineNum: t4 forList: t1)
                        ofList: t1.
            t4 _ t4 + 1].
    t5 _ t3 / t6.
    ^ t5

You had no value to pass through.

What did you do other than t1? T1 is already defined.

removed the colons.


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#854 2010-04-11 13:39:24

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

Re: Panther development thread

Sperry wrote:

SeptimusHeap wrote:

Sperry wrote:

Try this:

BlockSpec:

Code:

('average of numbers in %L' #r #listAverage 'list')

listaverage:

Code:

listAverage 
    | t1 t2 t3 t4 t5 t6 |
    t2 _ t1 lineCount.
    t6 _ t1 lineCount.
    t3 _ 0.
    t4 _ 1.
    [t2 >= 0]
        whileTrue: 
            [t2 _ t2 - 1.
            t3 _ t3 + self getLine: (self lineNum: t4 forList: t1)
                        ofList: t1.
            t4 _ t4 + 1].
    t5 _ t3 / t6.
    ^ t5

You had no value to pass through.

What did you do other than t1? T1 is already defined.

removed the colons.

Why? I need the colons to report the list. That defines t1.


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

Offline

 

#855 2010-04-11 13:40:22

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

Why? I need the colons to report the list. That defines t1.

Ahh.....

Then I have no idea.


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#856 2010-04-11 13:40:51

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

Re: Panther development thread

Nooooooooooooooooooooooooo!


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

Offline

 

#857 2010-04-11 13:47:46

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

Re: Panther development thread

SeptimusHeap wrote:

Nooooooooooooooooooooooooo!

Stupid source hacking... download the source and you can name your temps other than 't1', etc.


nXIII

Offline

 

#858 2010-04-11 13:48:59

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

Nooooooooooooooooooooooooo!

Hang on. I pasted the code myself and it came up with errors about lineCount. I think it should be lineCount:. But that didn't work either. Plus - lineCount isn't a function and lineCount: is.

@NXIII - WHERE IS SCRATCHSKIN LOCATED (for the fifth time.) Sorry if it sounds like i am nagging

Last edited by Sperry (2010-04-11 13:50:02)


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#859 2010-04-11 14:10:56

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

Re: Panther development thread

Sperry wrote:

SeptimusHeap wrote:

Nooooooooooooooooooooooooo!

Hang on. I pasted the code myself and it came up with errors about lineCount. I think it should be lineCount:. But that didn't work either. Plus - lineCount isn't a function and lineCount: is.

@NXIII - WHERE IS SCRATCHSKIN LOCATED (for the fifth time.) Sorry if it sounds like i am nagging

I already told you a while ago, download it here


nXIII

Offline

 

#860 2010-04-11 14:13:32

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

nXIII wrote:

Sperry wrote:

SeptimusHeap wrote:

Nooooooooooooooooooooooooo!

Hang on. I pasted the code myself and it came up with errors about lineCount. I think it should be lineCount:. But that didn't work either. Plus - lineCount isn't a function and lineCount: is.

@NXIII - WHERE IS SCRATCHSKIN LOCATED (for the fifth time.) Sorry if it sounds like i am nagging

I already told you a while ago, download it here

Sorry, I've allready downloaded the Source - I mod from the Source. I just forgot to copy Scratch Skin over. Whoops. Sorry for nagging you stupidly nXIII, you have my apologies.


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#861 2010-04-11 14:19:01

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

WOOOOOOO HOOOOOOOO! YES! I deleted EVERYTHING in the panther folder and downloaded and reinstalled each and every one individually and IT WORKS! I CAN SEE IT ALL!

Last edited by sparks (2010-04-11 14:24:27)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#862 2010-04-11 14:23:06

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

sparks wrote:

[color=purple]WOOOOOOO HOOOOOOOO! YES! I deleted EVERYTHING in the panther folder and downloaded and reinstalled each and every one individually and IT WORKS! I CAN SEE IT ALL!

No Purple again? Oh dear.


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#863 2010-04-11 14:25:18

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

aww! nXIII, the colour reporter is so cute!  big_smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#864 2010-04-11 14:32:45

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

nXIII, this new stuff is brilliant!

I know it's not done, but I'm just gonna list this anyway ^_^

• the [acolor] reporter dosen't show the dropdown arrow (or maybe the arrow's the same colour...
•I/O message has yet to state what is happening (eg, is trying to clear file) which would make file blocks safer.
•the blocks <file[s]exists?>, (line(n)of file[s]), and (content of []) with web addresses have yet to be added/discussed
•[color of pixil x sad n)y sad n)] IS BRILLIANT! people can make colour pickers now!  big_smile   big_smile   big_smile

more as I get to it.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#865 2010-04-11 14:35:52

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

Re: Panther development thread

Sparks I got no new password


You can now reach me on Twitter @johnnydean1_

Offline

 

#866 2010-04-11 14:37:10

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

before, Scratch had 200 shades and 200 colours for the pen, making 20,000 colours the pen could be. If we now have hue, saturation and brightness, does that increase the number of colours?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#867 2010-04-11 14:37:51

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

Re: Panther development thread

sparks wrote:

nXIII, this new stuff is brilliant!

I know it's not done, but I'm just gonna list this anyway ^_^

• the [acolor] reporter dosen't show the dropdown arrow (or maybe the arrow's the same colour...
•I/O message has yet to state what is happening (eg, is trying to clear file) which would make file blocks safer.
•the blocks <file[s]exists?>, (line(n)of file[s]), and (content of []) with web addresses have yet to be added/discussed
•[color of pixil x sad n)y sad n)] IS BRILLIANT! people can make colour pickers now!  big_smile   big_smile   big_smile

more as I get to it.

[/blocks]
Thanks! A few notes:
- Yea, the arrow is the exact same color  roll
- I haven't worked on the IO message
- Still getting there
- Thanks! I tried a more complex version that didn't include the sprite executing the block, but I failed....

Last edited by nXIII (2010-04-11 14:38:01)


nXIII

Offline

 

#868 2010-04-11 14:42:16

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

Re: Panther development thread

Sparks I got no new password
H
E
L
L
O
!


You can now reach me on Twitter @johnnydean1_

Offline

 

#869 2010-04-11 14:42:19

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

Re: Panther development thread

sparks wrote:

before, Scratch had 200 shades and 200 colours for the pen, making 20,000 colours the pen could be. If we now have hue, saturation and brightness, does that increase the number of colours?

Let's see... hue 0-359.999999999 (ten decimals accuracy) means 10^10 for each digit times 360 is 360e10, multiply by 10^10 and again for hue/saturation and you get 360e30 or 3.6e32 colors (360000000000000000000000000000000 colors), but you are now limited by the display, usually 24 bits (8 bits/color r, g, b) so that's 2^24 or 16777216 colors. Although, it's actually 100 shades and 200 colors, giving 20000 colors, but you forgot decimal shades/hues.


nXIII

Offline

 

#870 2010-04-11 14:47:04

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Panther development thread

how would you do a pi block? i saw panther had one, but i would like to see how its done.

Offline

 

#871 2010-04-11 14:48:17

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

Re: Panther development thread

johnnydean1 wrote:

Sparks I got no new password
H
E
L
L
O
!

Don't post the question twice! People will read it, and then make a decision. It doesn't help to post it a bunch of times, and there's even a chance that you'll post after someone has answered you and not notice, then keep posting and posting and posting!

urhungry wrote:

how would you do a pi block? i saw panther had one, but i would like to see how its done.

I made a new argument type which had a list of constants, then had something report based on the argument, like
'pi' = aConstant ifTrue: [^ 1.0 pi]. (pi is built in to floats)

Last edited by nXIII (2010-04-11 14:49:38)


nXIII

Offline

 

#872 2010-04-11 14:50:44

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

nXIII wrote:

sparks wrote:

before, Scratch had 200 shades and 200 colours for the pen, making 20,000 colours the pen could be. If we now have hue, saturation and brightness, does that increase the number of colours?

Let's see... hue 0-359.999999999 (ten decimals accuracy) means 10^10 for each digit times 360 is 360e10, multiply by 10^10 and again for hue/saturation and you get 360e30 or 3.6e32 colors (360000000000000000000000000000000 colors), but you are now limited by the display, usually 24 bits (8 bits/color r, g, b) so that's 2^24 or 16777216 colors. Although, it's actually 100 shades and 200 colors, giving 20000 colors, but you forgot decimal shades/hues.

so... what you're saying is that Panther (on a perfect quality screen) could pump out... over three and a half nonillion colours?!?!?!.... erm .... *head explodes*


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#873 2010-04-11 14:52:39

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

nXIII wrote:

I made a new argument type which had a list of constants, then had something report based on the argument, like
'pi' = aConstant ifTrue: [^ 1.0 pi]. (pi is built in to floats)

er, couldn't you just type out pi to X figures and then set the reporter to report that value?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#874 2010-04-11 14:53:33

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Panther development thread

urhungry wrote:

how would you do a pi block? i saw panther had one, but i would like to see how its done.

nXIII wrote:

I made a new argument type which had a list of constants, then had something report based on the argument, like
'pi' = aConstant ifTrue: [^ 1.0 pi]. (pi is built in to floats)

thanks

Offline

 

#875 2010-04-11 14:53:40

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

Re: Panther development thread

Sparks I need a new Password !!!!!

email it to me....

Last edited by johnnydean1 (2010-04-11 14:59:33)


You can now reach me on Twitter @johnnydean1_

Offline

 

Board footer