m
(Redid the scripts.)
Line 8: Line 8:
 
}}
 
}}
 
The '''When I Receive ()''' [[Blocks|block]] is a [[Control Blocks|Control block]] and a [[Hat Block|Hat block]]. [[Scripts]] that wear this block will be invoked once the specified [[broadcast]] has been sent by a calling script.
 
The '''When I Receive ()''' [[Blocks|block]] is a [[Control Blocks|Control block]] and a [[Hat Block|Hat block]]. [[Scripts]] that wear this block will be invoked once the specified [[broadcast]] has been sent by a calling script.
 +
 
==Example Uses==
 
==Example Uses==
 
[[Broadcasts]] are used to invoke scripts when certain evaluations are met {{-}} for scripts to activate once the broadcast is sent, those scripts must wear the '''When I Receive ()''' block. Some common uses are:
 
[[Broadcasts]] are used to invoke scripts when certain evaluations are met {{-}} for scripts to activate once the broadcast is sent, those scripts must wear the '''When I Receive ()''' block. Some common uses are:
 
*Preparing a change in the [[project]]
 
*Preparing a change in the [[project]]
  
[[File:Disabling_a_project.png]]
+
<scratchblocks>
 +
when I receive [Failure v]
 +
show
 +
wait (3) secs
 +
change [color v] effect by (25)
 +
stop all
 +
</scratchblocks>
  
 
*Hiding select sprites when a certain condition is met under a particular evaluation
 
*Hiding select sprites when a certain condition is met under a particular evaluation
 
*When a scene must be set
 
*When a scene must be set
 
*Effective communication with scripts or [[Sprite|sprites]]
 
*Effective communication with scripts or [[Sprite|sprites]]
 +
 
==See Also==
 
==See Also==
 
*[[Broadcast () (block)|Broadcast ()]]
 
*[[Broadcast () (block)|Broadcast ()]]

Revision as of 01:17, 4 January 2012

When I Receive ()
When I Receive ().png
Category Control
Type Hat

The When I Receive () block is a Control block and a Hat block. Scripts that wear this block will be invoked once the specified broadcast has been sent by a calling script.

Example Uses

Broadcasts are used to invoke scripts when certain evaluations are met — for scripts to activate once the broadcast is sent, those scripts must wear the When I Receive () block. Some common uses are:

when I receive [Failure v]
show
wait (3) secs
change [color v] effect by (25)
stop all
  • Hiding select sprites when a certain condition is met under a particular evaluation
  • When a scene must be set
  • Effective communication with scripts or sprites

See Also