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

#1 2008-12-26 19:29:19

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

New blocks

Maybe make something like this?
<when green flag clicked>
<forever if>recieve blocks
<switch to costume[
<end>

I mean, when you do <when I receive[  make it so you can put it in the middle of a script.

IE.
<when green flag clicked>
<wait until> received broadcast <the broadcast's name>
Do something.

Last edited by fg123 (2008-12-26 19:32:04)


Hai.

Offline

 

#2 2008-12-26 21:03:31

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: New blocks

1. Make a variable and
<set{ variable }to( 0 [/blocks]
at the start of the game.
2.
<when I receive[ broadcast
<set{ variable }to( 1 [/blocks]
3. The boolean is thus this:
<( <{ variable }> <=> 1 )>[/blocks]

Offline

 

#3 2008-12-27 03:53:47

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: New blocks

To cont on bhz.[blocks]
<when green flag clicked>
<forever>
  <if><key[ UP ]pressed?>
    <set{ broadcast }to(1 )>
  <end>
<end>
<when green flag clicked>
<forever>
  <wait until><( <{ broadcast }> <=> 1 )>
  <set{ broadcast }to(0)
  SCRIPT

<end>[/blocks]
get use to working with variables instead of broadcasts if you wish to move on to more advance languages.

Last edited by yambanshee (2008-12-27 03:59:08)

Offline

 

#4 2008-12-28 17:41:51

Tickles
Scratcher
Registered: 2008-11-16
Posts: 49

Re: New blocks

wait until i receive _____ wouldn't be necessary because you could just put     when i receive


A fun original puzzle game. The only one of its kind on scratch! Click here!

Offline

 

#5 2008-12-29 18:31:43

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: New blocks

Yea.... You can't put  <when I receive[ blocks  in the middle of a script? Can you?


Hai.

Offline

 

Board footer