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

#1 2012-12-04 19:43:15

arinerron
Scratcher
Registered: 2012-06-13
Posts: 46

Blocks scratch should add

I think they should add these

1. a 'while' block-while this = this, do this.

(i will type more later sorry, i am extremely busy :] thanks!)

when gf clicked
while <(timer) > [10]>
  go to [mouse-pointer v]
end
think [Scripts in your posts!] for (3) secs

Last edited by arinerron (2012-12-04 19:44:11)

Offline

 

#2 2012-12-04 20:26:54

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Blocks scratch should add

arinerron wrote:

I think they should add these

1. a 'while' block-while this = this, do this.

(i will type more later sorry, i am extremely busy :] thanks!)

when gf clicked
while <(timer) > [10]>
  go to [mouse-pointer v]
end
think [Scripts in your posts!] for (3) secs

workaround:

repeat until <not <condition>>
stuff
end


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#3 2012-12-04 20:40:56

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Blocks scratch should add

It exists in Insanity.  smile


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#4 2012-12-04 21:58:27

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Blocks scratch should add

SJRCS_011 wrote:

workaround:

repeat until <not <condition>>
stuff
end

Yes. The workaround is simple enough to eliminate the necessity for such a block.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#5 2012-12-04 22:28:14

sakafitrady
Scratcher
Registered: 2012-09-07
Posts: 100+

Re: Blocks scratch should add

a 'play sound [sound] while' block-plays the sound while doing the scripts!

play sound [sound v] while //the C block
 stuff
end

Offline

 

#6 2012-12-05 01:43:04

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

Re: Blocks scratch should add

``

sakafitrady wrote:

a 'play sound [sound] while' block-plays the sound while doing the scripts!

play sound [sound v] while //the C block
 stuff
end

when gf clicked
set [sndplaying v] to [0]
play sound [sound v]
set [sndplaying v] to [1]
reset timer
broadcast [sndplgo v]
stuff
stop all sounds
set [sndplaying v] to [0]
when i receive [sndplgo v]
forever
 if <(sndplaying) = [1]>
  if <(timer) > [0]> // Length of sound in seconds; use a floating point value
   play sound [sound v]
   reset timer
  end
 else
  stop script
 end
end
That works too.  hmm

Offline

 

#7 2012-12-05 08:58:05

doodle81
Scratcher
Registered: 2012-11-29
Posts: 12

Re: Blocks scratch should add

I completely agree that they should get this.

Offline

 

#8 2012-12-05 09:28:23

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Blocks scratch should add

@Grav, that works only if that is the only sound playing. I believe the solution would be the ability to stop individual sounds, or a sprite's sounds.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#9 2012-12-05 11:17:00

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Blocks scratch should add

Most simple programming languages choose either repeat until or while, since they're simply to opposite of eachother


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#10 2012-12-05 12:18:13

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: Blocks scratch should add

arinerron wrote:

I think they should add these

1. a 'while' block-while this = this, do this.

(i will type more later sorry, i am extremely busy :] thanks!)

when gf clicked
while <(timer) > [10]>
  go to [mouse-pointer v]
end
think [Scripts in your posts!] for (3) secs

The "while" block is rather unnecessary. Instead of

while <mouse down?>
you can use
repeat until <not <mouse down?>>
.
No support.


Alt of Firedrake969.

Offline

 

#11 2012-12-09 13:49:34

arinerron
Scratcher
Registered: 2012-06-13
Posts: 46

Re: Blocks scratch should add

yes you all are right, but there are alot more... :\

Offline

 

#12 2012-12-09 13:51:13

arinerron
Scratcher
Registered: 2012-06-13
Posts: 46

Re: Blocks scratch should add

when gf clicked
repeat until <forever if>
  go to [mouse-pointer v]
end
think [Scripts in your posts!] for (3) secs

Offline

 

#13 2012-12-09 13:52:40

arinerron
Scratcher
Registered: 2012-06-13
Posts: 46

Re: Blocks scratch should add

when gf clicked
say (BLEPO!)
think (thei

Last edited by arinerron (2012-12-09 18:53:04)

Offline

 

#14 2012-12-09 14:34:48

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Blocks scratch should add

Wait, sorry read the date wrong. Sorry mods. All my fault. Ugh. Now I feel bad.  sad

Last edited by ImagineIt (2012-12-09 14:35:15)

Offline

 

Board footer