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

#1 2012-04-14 09:42:07

TheCoolDog
Scratcher
Registered: 2011-01-29
Posts: 18

2.0 block suggestion

set max value of (a value) to [10]


-TheCoolDog-

Offline

 

#2 2012-04-14 09:47:42

TheCoolDog
Scratcher
Registered: 2011-01-29
Posts: 18

Re: 2.0 block suggestion

set minimum value of (a value) to [0]

Last edited by TheCoolDog (2012-04-14 09:48:01)


-TheCoolDog-

Offline

 

#3 2012-04-14 10:11:16

pi3
Scratcher
Registered: 2011-12-31
Posts: 500+

Re: 2.0 block suggestion

Good idea, but it can easily be done with

if < (value) > [10] >
    set (value) to [10]
end
if < (value) < [0] >
    set (value) to [0]
end
And then on the script with the changing variable:
if < whatever >
     if <(value)<[10]>
          change (value) by [1]
     end
end
And pretty much the same for the less than 0.
Edit: Above in the blank if is supposed to be if value is less than 10. I don't know why it's not working.

Last edited by pi3 (2012-04-14 10:13:44)


http://i44.tinypic.com/ofdhc4.jpgThanks FreshStudios!

Offline

 

#4 2012-04-14 10:13:41

TheCoolDog
Scratcher
Registered: 2011-01-29
Posts: 18

Re: 2.0 block suggestion

yea i know but it would make it easier and faster.


-TheCoolDog-

Offline

 

#5 2012-04-14 10:15:38

pi3
Scratcher
Registered: 2011-12-31
Posts: 500+

Re: 2.0 block suggestion

TheCoolDog wrote:

yea i know but it would make it easier and faster.

Well, the way I just showed is pretty easy and fast.


http://i44.tinypic.com/ofdhc4.jpgThanks FreshStudios!

Offline

 

#6 2012-04-14 11:18:46

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: 2.0 block suggestion

pi3 wrote:

Good idea, but it can easily be done with

if < (value) > [10] >
    set [value v] to [10]
end
if < (value) < [0] >
    set [value v] to [0]
end
And then on the script with the changing variable:
if < whatever >
     if <(value) < [10]>
          change [value v] by (1)
     end
end
And pretty much the same for the less than 0.
Edit: Above in the blank if is supposed to be if value is less than 10. I don't know why it's not working.

your [scripts v] fixed by [joefarebrother v]

Last edited by joefarebrother (2012-04-14 11:19:12)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

Board footer