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

#1 2008-11-13 01:20:26

Warhunter
Scratcher
Registered: 2008-09-19
Posts: 100+

maybe a block called (broadcast to sprite?)

just a suggestion.


HIVE
please take your time and have a play. Features: Auto-saved data, Various Achievements, Smooth Movement, Different enemies with different behaviors, 3 difficult bosses, Score system, Credits, and EPIC MUSIC.

Offline

 

#2 2008-11-13 02:54:20

TheCatAndTheBanana
Scratcher
Registered: 2008-03-21
Posts: 1000+

Re: maybe a block called (broadcast to sprite?)

that would be useful,but you can do it already.



<broadcast[

<when I receive[
<if> <( <{ sprite # } > <=> certain number )>
what you want here
<end>


My Newest Project!
Ceta? wat r u doin? CETA! STAHP!

Offline

 

#3 2008-11-13 03:14:23

Warhunter
Scratcher
Registered: 2008-09-19
Posts: 100+

Re: maybe a block called (broadcast to sprite?)

TheCatAndTheBanana wrote:

<broadcast[

<when I receive[
<if> <( <{ sprite # } > <=> certain number )>
what you want here
<end>

sry i dont unerstand that. imean so that you can use the same broadcast over and over again but to a particular sprite, so all the others dont do something.


HIVE
please take your time and have a play. Features: Auto-saved data, Various Achievements, Smooth Movement, Different enemies with different behaviors, 3 difficult bosses, Score system, Credits, and EPIC MUSIC.

Offline

 

#4 2008-11-13 04:05:54

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: maybe a block called (broadcast to sprite?)

Warhunter wrote:

just a suggestion.

I agree, it would be a nice feature!

The CatAndTheBanana is showing you a way that you can get the same effect with the blocks we have now using a variable called "Sprite #" which you would set before you Broadcast the message.  Then, even though all the sprites would get the message, you have the IF block there to make sure that only the sprite you want actually does anything when it receives it.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#5 2008-11-13 13:52:04

yambanhee_extras
Scratcher
Registered: 2008-11-11
Posts: 9

Re: maybe a block called (broadcast to sprite?)

however with the same scripting, you can only use variables. simply have a sprite number broadcast variable and instead of broadcasting something, change the variable to a certinnumer then change it back... something like this [blocks]
<when[ broadcasting sprite ]clicked>
<set{ whatever }to( 4 )
<set{ whatever }to( 0 )
<end>

the on sprite num 4

<when green flag clicked>
<forever>
<if><( <{ whatever }> <=> 4 )>
   SCRIPT
  <end>
<end>
[/blocks]
This is the same method i use with my Lunar Com softwear

Offline

 

#6 2008-11-16 16:46:24

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

Re: maybe a block called (broadcast to sprite?)

TheCatAndTheBanana wrote:

that would be useful,but you can do it already.



<broadcast[

<when I receive[
<if> <( <{ sprite # } > <=> certain number )>
what you want here
<end>

I never knew there was a "sprite #" reporter block.

Offline

 

Board footer