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

#1701 2011-07-21 10:54:42

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Sparks, maybe you could do it.
I'll add it after I vote on the elections.  big_smile

Offline

 

#1702 2011-07-21 10:57:02

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

Re: ITopic: Welcome to your local block library!

the elections! I'm so nervous and excited! ... exervous? nervexited?  big_smile


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

Offline

 

#1703 2011-07-21 11:50:45

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Please, will someone add the following two lines to my (factorial of %n) block, right after the | answer t1store | ?

Code:

t1 isInf ifTrue:[^0].
t1 isNaN ifTrue:[^0].

The reason is that if t1 = Infinity Scratch will freeze, and I don't want to risk it with NaNs.

Last edited by Greenatic (2011-07-21 11:51:28)

Offline

 

#1704 2011-07-21 11:52:00

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Yes.
I won't be able to do an update until tomorrow.

Offline

 

#1705 2011-07-21 11:56:08

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

This is a bit embarrassing...
Meowmeow55, where is your BYOB sprite uploader?

Offline

 

#1706 2011-07-21 12:46:22

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

Re: ITopic: Welcome to your local block library!

here. Luckily it's in my history  tongue  You'll need to log in though!

Last edited by sparks (2011-07-21 12:54:45)


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

Offline

 

#1707 2011-07-21 12:47:35

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

here. Luckily it's in my history  tongue  You'll need to log in though!


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#1708 2011-07-21 12:52:36

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

It kept logging me out when I put it in the URL bar!

Offline

 

#1709 2011-07-21 13:19:04

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

It kept logging me out when I put it in the URL bar!

It probably has something to do with the session IDs that phpBB uses...Try wandering around the forums for a bit, then going to the page. Or maybe your browser is using a cached copy?


Yawn.

Offline

 

#1710 2011-07-21 16:21:09

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

sparks wrote:

the elections! I'm so nervous and excited! ... exervous? nervexited?  big_smile

I voted for you... you deserve it!


http://goo.gl/RDqKF

Offline

 

#1711 2011-07-21 17:40:58

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

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

sparks wrote:

the elections! I'm so nervous and excited! ... exervous? nervexited?  big_smile

I voted for you... you deserve it!

Thanks, TuragaTreeko! I appreciate it!


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

Offline

 

#1712 2011-07-21 20:07:10

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

sparks wrote:

the elections! I'm so nervous and excited! ... exervous? nervexited?  big_smile

I voted for you... you deserve it!

yeah, me too  big_smile


the the the the the

Offline

 

#1713 2011-07-22 09:21:41

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

I have a block, but it is having a fit about the double ifTrue:'s. So if anyone can help, Thanks.

Code:

First, make a new dropdown (for %Y) with choice of 'Infinite', and the menu should contain 'Infinite', 'Not a Number', and 'Too Small'.

Code:

('%s is %Y' #b #not: 'string'
Number:)

Code:

not:t1Number:t2
     t2 = 'Infinite' ifTrue:
    [t1 isInf ifTrue: [^true]].
   t2 = 'Not a Number' ifTrue:
    [t1 isNan ifTrue: [^true]].
   t2 = 'Too Small' ifTrue:
    [t1 isNil ifTrue: [^true]].
            ^false

Last edited by TuragaTreeko (2011-07-22 09:23:16)


http://goo.gl/RDqKF

Offline

 

#1714 2011-07-22 10:10:26

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

I have a block, but it is having a fit about the double ifTrue:'s. So if anyone can help, Thanks.

Code:

First, make a new dropdown (for %Y) with choice of 'Infinite', and the menu should contain 'Infinite', 'Not a Number', and 'Too Small'.

Code:

('%s is %Y' #b #not: 'string'
Number:)

Code:

not:t1Number:t2
     t2 = 'Infinite' ifTrue:
    [t1 isInf ifTrue: [^true]].
   t2 = 'Not a Number' ifTrue:
    [t1 isNan ifTrue: [^true]].
   t2 = 'Too Small' ifTrue:
    [t1 isNil ifTrue: [^true]].
            ^false

I think you're supposed to use ifNaN, not ifNan.  Maybe that's messing it up.

Offline

 

#1715 2011-07-22 11:30:52

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

Re: ITopic: Welcome to your local block library!

Block request: (for panther)

delete costume [costume1]
delete background [background1]

This would be particularly useful when deleting costumes, backgrounds that you added using the save stage to background block.a motto too.

Last edited by LiquidMetal (2011-07-22 11:34:25)

Offline

 

#1716 2011-07-22 12:36:03

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

TuragaTreeko wrote:

I have a block, but it is having a fit about the double ifTrue:'s. So if anyone can help, Thanks.

Code:

First, make a new dropdown (for %Y) with choice of 'Infinite', and the menu should contain 'Infinite', 'Not a Number', and 'Too Small'.

Code:

('%s is %Y' #b #not: 'string'
Number:)

Code:

not:t1Number:t2
     t2 = 'Infinite' ifTrue:
    [t1 isInf ifTrue: [^true]].
   t2 = 'Not a Number' ifTrue:
    [t1 isNan ifTrue: [^true]].
   t2 = 'Too Small' ifTrue:
    [t1 isNil ifTrue: [^true]].
            ^false

I think you're supposed to use ifNaN, not ifNan.  Maybe that's messing it up.

Forgot a couple periods.

Offline

 

#1717 2011-07-22 12:52:45

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: ITopic: Welcome to your local block library!

these are Awesome blocks and i am using in my modification, i already started giving credit and the credits are put in my "credited helpers and resources" folder.


http://i47.tinypic.com/rrqe13.gif

Offline

 

#1718 2011-07-22 13:00:55

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: ITopic: Welcome to your local block library!

I'm not sure whether this is the right place to put it, but how about a (repition no.) variable block so for example you have a repeat (7) block and it tells you how many times it's repeated so far.


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#1719 2011-07-22 14:10:45

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: ITopic: Welcome to your local block library!

('pi' #r #pi)

Code:

 
pi
^ 3.14159265

('pi^2' #r #piRaisedToTwo)

Code:

 
piRaisedToTwo
^ 3.14159265 raisedTo: 2

http://i47.tinypic.com/rrqe13.gif

Offline

 

#1720 2011-07-22 16:31:35

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

Re: ITopic: Welcome to your local block library!

RUMCHEERYPOOPOO wrote:

I'm not sure whether this is the right place to put it, but how about a (repition no.) variable block so for example you have a repeat (7) block and it tells you how many times it's repeated so far.

hmm, this would certainly save making a counting variable but I think that to link the reporter to a certain repeats loop wouldn't be possible without heavily editing Scratch...


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

Offline

 

#1721 2011-07-22 17:38:19

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

poemon1 wrote:

('pi' #r #pi)

Code:

 
pi
^ 3.14159265

('pi^2' #r #piRaisedToTwo)

Code:

 
piRaisedToTwo
^ 3.14159265 raisedTo: 2

Both of these can be acheived through other blocks.


http://goo.gl/RDqKF

Offline

 

#1722 2011-07-22 17:40:07

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

Greenatic wrote:

TuragaTreeko wrote:

I have a block, but it is having a fit about the double ifTrue:'s. So if anyone can help, Thanks.

Code:

First, make a new dropdown (for %Y) with choice of 'Infinite', and the menu should contain 'Infinite', 'Not a Number', and 'Too Small'.

Code:

('%s is %Y' #b #not: 'string'
Number:)

Code:

not:t1Number:t2
     t2 = 'Infinite' ifTrue:
    [t1 isInf ifTrue: [^true]].
   t2 = 'Not a Number' ifTrue:
    [t1 isNan ifTrue: [^true]].
   t2 = 'Too Small' ifTrue:
    [t1 isNil ifTrue: [^true]].
            ^false

I think you're supposed to use ifNaN, not ifNan.  Maybe that's messing it up.

Forgot a couple periods.

Oh, where?


http://goo.gl/RDqKF

Offline

 

#1723 2011-07-22 18:22:17

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

scimonster wrote:

TuragaTreeko wrote:


HEY! THAT WAS MY BLOCK! Oh, btw, it should be
objName_t1 instead.
Also, does anyone know why

Code:

absoluteValue:t1
     [^t1 asPositive]

doesn't work for

Code:

('|%n|' #r #absoluteValue: -5)

ABS is already an implemented function.  tongue

Code:

^t1 abs

And the other code I posted works fine...

Code:

absoluteValue:t1
t1 < 0 ifTrue: [^ t1 * -1].
    ^ t1

Yeah, sorry bout that, (the abs thing), but I was the one who originally made the open user page and rename page, both work fine, and they haven't been added, and jslomba and poeman1 ended up getting the credit! mad   mad   mad   mad   mad  mad: So, I am not happy.

sorry bout that


http://i47.tinypic.com/rrqe13.gif

Offline

 

#1724 2011-07-23 14:19:55

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

RUMCHEERYPOOPOO wrote:

I'm not sure whether this is the right place to put it, but how about a (repition no.) variable block so for example you have a repeat (7) block and it tells you how many times it's repeated so far.

That's doable in BYOB, but I'm not sure about Scratch.

Offline

 

#1725 2011-07-23 15:35:12

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: ITopic: Welcome to your local block library!

poemon1 wrote:

('pi' #r #pi)

Code:

 
pi
^ 3.14159265

('pi^2' #r #piRaisedToTwo)

Code:

 
piRaisedToTwo
^ 3.14159265 raisedTo: 2

If you want to use Pi, you should use the Float class variable Pi, which is defined as:

Pi = 3.14159265358979323846264338327950288

Offline

 

Board footer