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

#1 2007-08-03 11:36:11

Llamalover
Scratcher
Registered: 2007-05-18
Posts: 100+

Booleans

Booleans would be really good too, at the moment you have to use a variable, for example if variable 'walking' = 1 (true)
wait until walking = 0 (false)

if variable 'walking' = 0 (false)
set walking to 1
move 10 steps
set walking to 0

with a boolean it wouldbe

if walking is true
wait until walking is false
if walking is false
set walking to true
move 10 steps
set walking to false
That's a pretty weak example but it was just quick


Be nice, I'm an old lady  wink

Offline

 

#2 2007-08-03 17:26:08

mdusoe
Scratcher
Registered: 2007-06-14
Posts: 32

Re: Booleans

or even -

If Walking
  wait until not walking
  if not walking
  set walking to true
...

Offline

 

#3 2007-08-05 08:07:08

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Booleans

One doesn't need a new variable type for this---if scratch followed the C convention of treating zero as false and any non-zero value as true, you could do this with ordinary variables.

Offline

 

#4 2007-08-05 08:29:54

Llamalover
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Booleans

But it doesn't!


Be nice, I'm an old lady  wink

Offline

 

Board footer