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

#1 2012-08-01 10:54:35

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

A new block...

Well, I know this has a workaround, but it's really long and I don't know how to do it outside of examples like this.  I used it for the shop (download to see) but the scripts got long and messy.  Now, here is my suggested block in action:

if <(variable one) changed by (-1)>
change [variable 2 v] by (-1)


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#2 2012-08-01 11:35:35

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: A new block...

set [old value v] to (value)
forever
if <(variable) = ((old value) - (1))>
change [variable 2 v] by (-1)
end
set [old value v] to (value)
end


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#3 2012-08-01 12:00:40

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: A new block...

That wouldn't work the same way.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#4 2012-08-01 12:12:13

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: A new block...

Firedrake969 wrote:

That wouldn't work the same way.

Please explain how your block would work.

Last edited by MathWizz (2012-08-01 12:12:42)


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#5 2012-08-01 14:49:41

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: A new block...

I believe this block can be created using this script:

set [oldval v] to (whatever)
wait until <[0] = [0]>
if <not <(oldval) = (whatever)>>
 whatever you want to happen
end


http://i50.tinypic.com/312u714.jpg

Offline

 

#6 2012-08-01 14:52:53

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: A new block...

BirdByte wrote:

I believe this block can be created using this script:

set [oldval v] to (whatever)
wait until <[0] = [0]>
if <not <(oldval) = (whatever)>>
 whatever you want to happen
end

That would detect any change at all.

This script would detect a specific change:

set [oldval v] to (whatever)
wait until <[0] = [0]>
if <(oldval) = ((whatever) + (input))>
 whatever you want to happen
end


http://i50.tinypic.com/312u714.jpg

Offline

 

Board footer