Hi, Currently you can't drag a variable into the receive block. It would be very useful if you could. For Example: I was creating a mesh between many users that relies on broadcasts. I can broadcast a variable, but I can't receive it. I have to define it myself. Thanks, just a suggestion!
Offline
The when I receive button is only used for broadcasting.
Offline
You can't?
Hmm, weird.
Support!
Offline
Hmm....to me, there is a totally different use for the variable and broadcast tools. Variables are like storage and broadcasts are like starters. So, "receiving" a variable doesn't make sense to me, as how is it received? Once it's changed from 0?
And why is this beneficial, versus just doing
wait until (variable 1) = (activate) Broadcast (do something)?

Offline
He means changing the value of the dropdown broadcast so you can put in a variable, so it's
when I receive [(x)]^supposed to be
(x)instead of
when I receive [1 v]
Last edited by nickbrickmaster (2012-03-15 22:09:06)
Offline
nickbrickmaster wrote:
He means changing the value of the dropdown broadcast so you can put in a variable, so it's
when I receive [(x)]^supposed to be(x)instead ofwhen I receive [1 v]
Yeah, I understand that.

Offline
Well, I was trying to create a chat program that allows an infinite amount of users to join. The chat user connects through the main program by broadcasting "Add User". When the host receives the broadcast, the var # of already connected users is incremented by 1. The main program also adds a timer to a list. The reason for the timer is to detect when a user disconnects from the main host and it works by each individual chat user broadcasting their user# which was obtained during the "Add User" broadcast from the # of users var at that time. When the main program receives that user#, which I must name and create in the broadcast individually, because I can't insert a variable into the "When I Receive" block, the number is set back to 20. If the number reaches 0, the user disconnects and all user #s are shifted to match the disconnection. Sorry for the trouble, now I realize that it wouldn't work If i put a variable into the when I Receive box. I would have to clone a sprite (Or script if I could) when I receive "Add User" and the sprite would have to create a new broadcast. But this can't be done without a variable placed into the "When I receive" block that would have to be cloned with each added user and changed. It's all a little confusing, and I don't have much programming background, but I got everything to work except for the ability to host infinite amounts of chat users. I currently have to create each "When I Receive" block, which i've only made 10 of so far. This is probably not the most efficient way, but it worked perfectly with a lot of users connected. If the sprite cloning is added to scratch 2.0. I think adding this would be useful.
Last edited by itsmomito (2012-03-15 23:26:29)
Offline
I could think of times that I'd like to put a reporter in that slot.
when I receive (variable) when I receive (x position) when I receive (join [action ](pick random (1) to (3)))
Last edited by scimonster (2012-03-16 05:46:59)
Offline
stevetheipad wrote:
Hmm....to me, there is a totally different use for the variable and broadcast tools. Variables are like storage and broadcasts are like starters. So, "receiving" a variable doesn't make sense to me, as how is it received? Once it's changed from 0?
And why is this beneficial, versus just doingwait until <(variable 1) = (activate)> Broadcast (do something)?
Fixed it a bit.
Offline
joletole wrote:
stevetheipad wrote:
Hmm....to me, there is a totally different use for the variable and broadcast tools. Variables are like storage and broadcasts are like starters. So, "receiving" a variable doesn't make sense to me, as how is it received? Once it's changed from 0?
And why is this beneficial, versus just doingwait until <(variable 1) = (activate)> Broadcast (do something)?Fixed it a bit.
This is basically the same thing as broadcasting a variable.
Offline