Well, sometimes you have to use a "When i recieve..." , like in this script:
[blocks]
<when I receive[ anything ]<broadcast[ you win ]
[/blocks]
Well if you could have a second "When I recieve ..." in there, it could be easier. So when i recieve this, wait until i recieve this, then do this. It could help to do a ton of scripting in only a few lines of scripting.
[blocks]
<( PS. Scratch <=> awesome! )>
Offline
You could just do this:
[when I receive [broadcast])
[wait until <(variable) = (1)>]
action goes here
If there were a <[broadcast] received?> block, it would sort of work for your suggestion:
[when I receive [broadcast 1])
[wait until <[broadcast 2] received?>]
action goes here
The "When I receive" idea is more of a Hat block - I think the <[ ] received?> Boolean block would fit better.
Last edited by Jonathanpb (2010-09-12 04:15:18)
Offline
Jonathanpb wrote:
You could just do this:
[when I receive [broadcast])
[wait until <(variable) = (1)>]
action goes here
If there were a <[broadcast] received?> block, it would sort of work for your suggestion:
[when I receive [broadcast 1])
[wait until <[broadcast 2] received?>]
action goes here
The "When I receive" idea is more of a Hat block - I think the <[ ] received?> Boolean block would fit better.
Yeah... Plus, <[ v] received?> just sounds better.
Offline
Sorry, but I don't think it would really work well. I quote coolstuff from here:
coolstuff wrote:
I don't know how many times I've had to type this, but it WON"T HAPPEN BECAUSE BROADCASTS AREN'T BOOLEAN.
Boolean means the answer is 0 or 1. All of the diamond-shaped blocks are boolean, <a = 1> is boolean because either a is equal to one or a is not equal to one, 1 being if it is equal and 0 being if it isn't.
Thus it's not possible - a broadcast happens instantly, so a script couldn't catch it, and to allow it to catch it you would have to slow the broadcasting process which would be overall bad, as slow as it already is.
Offline
Yes Broadcasts are not Boolean. However, a viable block is:
"[Wait Until <Broadcast --> Recieved]"
"Broadcast Recieved" should not be a boolean, however the above blocks allow you do all you want to do and not mess things up.
Offline
demosthenes wrote:
Yes Broadcasts are not Boolean. However, a viable block is:
"[Wait Until <Broadcast --> Recieved]"
"Broadcast Recieved" should not be a boolean, however the above blocks allow you do all you want to do and not mess things up.
But what if you broadcast a message multiple times, such as in a recursion or something similar?
Offline
Lucario621 wrote:
demosthenes wrote:
Yes Broadcasts are not Boolean. However, a viable block is:
"[Wait Until <Broadcast --> Recieved]"
"Broadcast Recieved" should not be a boolean, however the above blocks allow you do all you want to do and not mess things up.But what if you broadcast a message multiple times, such as in a recursion or something similar?
Then each time it would be "True" for a fraction of a second, and any current scripts waiting at a "[Wait Until <Broadcast --> Recieved]" would pass on to the next block, otherwise things would remain the same.
Offline