Discuss Scratch

WilliamA99
Scratcher
2 posts

make a 'íf i receive a message' block

this is what I mean:

if <I recieve [message1 v]> then

end

Last edited by WilliamA99 (July 17, 2016 02:05:30)

cs156175
Scratcher
1000+ posts

make a 'íf i receive a message' block

easy workaround.

when I receive [message v]
...::grey


DownsGameClub
Scratcher
1000+ posts

make a 'íf i receive a message' block

Sorry, but there is too much ambiguity for this block-

The Scratch Team wrote:

There is way too much ambiguity to how this would work. Would it return true of the broadcast was fired at any point since the project was created, since the green flag was clicked, since something else was broadcasted, etc.? If you really want to do something like this, instead just make a variable and set it to 1 and use the equals block.

–DGC
Scratcher since Aug. 2015 +++ Fire Alarm Enthusiast +++ College student studying fire protection engineering
LP_Play
Scratcher
1000+ posts

make a 'íf i receive a message' block

No support. Workaround stated below;

when I receive [message1 v]
set [message1 v] to [1]
when green flag clicked
set [message1 v] to [0]
forever
if <(message1) = [1]> then
. . .
end
end

Also, please read the stickies first.

Last edited by LP_Play (July 17, 2016 01:06:07)


Sheep_maker
Scratcher
1000+ posts

make a 'íf i receive a message' block

How long does this boolean stay true once its corresponding broadcast is broadcasted?

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
gamebeater187
Scratcher
1000+ posts

make a 'íf i receive a message' block

Support ONLY for
if  I receive [ v] then {say [example]} end if <> :: events

Last edited by gamebeater187 (July 17, 2016 16:44:08)


My 1000th post!
I haven't changed my logo since my 96th post on 2014. Now at 1000 posts, I changed my logo!
zorket
Scratcher
500+ posts

make a 'íf i receive a message' block

gamebeater187 wrote:

Support ONLY for
if  I receive [ v] then {say [example]} end if <> :: events
I believe this is the equivalent of:
when I receive [ v]
repeat until <>
. . .
end

Yes
JavierR100
Scratcher
500+ posts

make a 'íf i receive a message' block

Sorry, but your suggestion is being rejected by stickies:

The stickies wrote:

9. <broadcast [ ] received> boolean
There is way too much ambiguity to how this would work. Would it return true of the broadcast was fired at any point since the project was created, since the green flag was clicked, since something else was broadcasted, etc.? If you really want to do something like this, instead just make a variable and set it to 1 and use the equals block.
Use workarounds above
Scratch on!

My customs Blocks on “Snap!” || search in google HN54FyF4KW27o*YWAD94qjEMLV62+]59 to find all my posts. || “Fantasy Tank Builder” Topic || Diep.io | Official Thread || Geometry Dash name account: "JavierR100". || Geometry Dash Official Topic

Actually, [B]en is my legal name!- Pen, BFB 5

Sorry, I'm gone to roblox now, so Im not able to reply anymore!

agarraga
Scratcher
500+ posts

make a 'íf i receive a message' block

Please agree to the sticky

9. <broadcast received> boolean
There is way too much ambiguity to how this would work. Would it return true of the broadcast was fired at any point since the project was created, since the green flag was clicked, since something else was broadcasted, etc.? If you really want to do something like this, instead just make a variable and set it to 1 and use the equals block.
CoffeeCat22
Scratcher
1 post

make a 'íf i receive a message' block

gamebeater187 wrote:

Support ONLY for
if  I receive [ v] then {say [example]} end if <> :: events
how do I make that block?
LionHeart70
Scratcher
1000+ posts

make a 'íf i receive a message' block

It's rejected, because there's too much ambiguity to how it'd work.

lh70 / nora/tobi / she-they pronouns / pansexual-demisexual / 14 / sagittarius / furry / artist / intp / stop-motion films / lbp / fall out boy / panic! at the disco / twenty one pilots / stranger things / a series of unfortunate events
“When you have a bad day, a really bad day, try and treat the world better than it treated you.” -Patrick Stump
“Music seems to hold everything together. It seems to make things not so chaotic sometimes. It seems to make things make more sense sometimes.” -Tyler Joseph
“You'll fear your fears forever if you never do things you're afraid of.” -Josh Dun
“I'm still figuring out who I am, but I know I'm not who I was.” -Brendon Urie
Botcho_Otkho
Scratcher
1000+ posts

make a 'íf i receive a message' block

Read the sticky,this is a rejected suggestion.

I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
Jazop06
Scratcher
17 posts

make a 'íf i receive a message' block

WilliamA99 wrote:

this is what I mean:

if <I recieve [message1 v]> then

end


U mean Like this

if <when I receive [message1 v]> then
...
end

Last edited by Jazop06 (July 27, 2017 22:45:52)

Charles12310
Scratcher
1000+ posts

make a 'íf i receive a message' block

No Support. There is a lot of confusion on how this would work. Would the block turn true for only half a second, then false? Or will it turn true forever after the broadcast being received? Or will the Boolean turn true at the start of the broadcasts, and false at the end? We don't know how this is supposed to work.

// Half A Second

when I receive [broadcast v]
set [received? v] to [true]
wait (0.5) secs
set [received? v] to [false]

when I receive [broadcast v]
...

// Forever After Receiving:

when gf clicked
set [received? v] to [false]

when I receive [broadcast v]
set [received? v] to [true]
...

// Only During Broadcast:

when gf clicked
set [received? v] to [false]

when I receive [broadcast v]
set [received? v] to [true]
...
set [received? v] to [false]


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
Charles12310
Scratcher
1000+ posts

make a 'íf i receive a message' block

Charles12310 wrote:

No Support. There is a lot of confusion on how this would work. Would the block turn true for only half a second, then false? Or will it turn true forever after the broadcast being received? Or will the Boolean turn true at the start of the broadcasts, and false at the end? We don't know how this is supposed to work.

// Half A Second

when I receive [broadcast v]
set [received? v] to [true]
wait (0.5) secs
set [received? v] to [false]

when I receive [broadcast v]
...

// Forever After Receiving:

when gf clicked
set [received? v] to [false]

when I receive [broadcast v]
set [received? v] to [true]
...

// Only During Broadcast:

when gf clicked
set [received? v] to [false]

when I receive [broadcast v]
set [received? v] to [true]
...
set [received? v] to [false]
However, the ones not rejected are:

if I receive [ v] {
...
} :: events

wait until I receive [ v] :: events

repeat until I receive [ v] {
...
} :: events


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
Botcho_Otkho
Scratcher
1000+ posts

make a 'íf i receive a message' block

gamebeater187 wrote:

Support ONLY for
if  I receive [ v] then {say [example]} end if <> :: events
What? How would this block work?

I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
Botcho_Otkho
Scratcher
1000+ posts

make a 'íf i receive a message' block

It's a rejected suggestion.

I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
Charles12310
Scratcher
1000+ posts

make a 'íf i receive a message' block

Charles12310 wrote:

Charles12310 wrote:

No Support. There is a lot of confusion on how this would work. Would the block turn true for only half a second, then false? Or will it turn true forever after the broadcast being received? Or will the Boolean turn true at the start of the broadcasts, and false at the end? We don't know how this is supposed to work.

// Half A Second

when I receive [broadcast v]
set [received? v] to [true]
wait (0.5) secs
set [received? v] to [false]

when I receive [broadcast v]
...

// Forever After Receiving:

when gf clicked
set [received? v] to [false]

when I receive [broadcast v]
set [received? v] to [true]
...

// Only During Broadcast:

when gf clicked
set [received? v] to [false]

when I receive [broadcast v]
set [received? v] to [true]
...
set [received? v] to [false]
However, the ones not rejected are:

if I receive [ v] {
...
} :: events

wait until I receive [ v] :: events

repeat until I receive [ v] {
...
} :: events
What About These?


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
walkcycle
Scratcher
500+ posts

make a 'íf i receive a message' block

Charles12310 wrote:

What About These?
Would complicate Scratch without adding any real benefit.

Powered by DjangoBB