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

#1 2010-07-31 06:12:25

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

A little Source help

How do I make a script that is triggered when a broadcast is recieved in the source code?


You can now reach me on Twitter @johnnydean1_

Offline

 

#2 2010-07-31 08:48:24

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: A little Source help

1. [blocks] <when I receive[ ]>
2. My <{ last received  }> in Slash. [/blocks]
3. Rubix_cube_guy238's <i receive> block. http://scratch.mit.edu/forums/viewtopic.php?id=39580

Offline

 

#3 2010-07-31 08:54:06

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: A little Source help

In squeak?


You can now reach me on Twitter @johnnydean1_

Offline

 

#4 2010-08-02 11:49:48

Jwosty
Scratcher
Registered: 2009-12-19
Posts: 500+

Re: A little Source help

What do you mean? The event hat is already there...  hmm


http://i39.tinypic.com/18ert5.png Google it.  smile

Offline

 

#5 2010-08-02 12:25:55

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: A little Source help

I need to make a custom code in Scratch thats triggred when a thing is broadcast.

NOT A SCRATCH SCRIPT USING A HAT BLOCK

But a extra bit of squeak.


You can now reach me on Twitter @johnnydean1_

Offline

 

#6 2010-08-02 13:21:06

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: A little Source help

I think it's:

Code:

 eventReceived: (bla)

but I'm not sure...


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#7 2010-08-02 19:04:58

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: A little Source help

Try modifying ScratchStageMorph's step method and adding a bit to check all ScratchEvent instances.


nXIII

Offline

 

Board footer