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

#1 2012-02-15 09:13:12

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

">" block inside an "or" (forum blocks)

How do you this?

The closest I've managed to come is

<<(maxvel)=(xvel)> or <(maxvel)>(xvel)>>
Because the ">" can also mean the end of a boolean, I think it gets confused  hmm

Last edited by RedRocker227 (2012-02-15 09:14:13)


Why

Offline

 

#2 2012-02-15 09:37:54

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

Re: ">" block inside an "or" (forum blocks)

Yep, it gets confused. It's a bug.

Offline

 

#3 2012-02-15 09:42:56

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: ">" block inside an "or" (forum blocks)

scimonster wrote:

Yep, it gets confused. It's a bug.


http://i.imgur.com/1QqnHxQ.png

Offline

 

#4 2012-02-15 09:45:34

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: ">" block inside an "or" (forum blocks)

Oh okay. I was just wondering if there was another way of doing it.


Why

Offline

 

#5 2012-02-15 10:07:02

mattlai2
Scratcher
Registered: 2011-12-06
Posts: 100+

Re: ">" block inside an "or" (forum blocks)

<<(maxvel) = (xvel)> or <(maxvel) > (xvel)>>

Code:

[scratchblocks]<<(maxvel) = (xvel)> or <(maxvel) > (xvel)>>[/scratchblocks]

I inserted extra spaces.

Offline

 

#6 2012-02-15 14:44:21

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: ">" block inside an "or" (forum blocks)

Or, you could do it this way:

<not <(maxvel) < (xvel)>>
wink


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#7 2012-02-15 14:47:18

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: ">" block inside an "or" (forum blocks)

mattlai2 wrote:

<<(maxvel) = (xvel)> or <(maxvel) > (xvel)>>

Code:

[scratchblocks]<<(maxvel) = (xvel)> or <(maxvel) > (xvel)>>[/scratchblocks]

I inserted extra spaces.

Ah!  But it still doesn't work if you try and do an AND or an OR with TWO > comparisons in it  sad

Code:

[scratchblocks]
if <<(x) > (3)> or <(y) > (3)>>
[/scratchblocks]

http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer