I'm not sure if this has been done before, but here is a suggestion for a new boolean block.
< received [ ] ?>
This is an idea for a Control block, in the broadcast category. If a broadcast, let's say "next level" has been received, the block becomes true. For example, when put into a "wait until":
|wait until < received [next level] ?> |
This would allow a player in a game to finish a level, and hide, then it waits until next level has been broadcasted, and shows.
Another boolean broadcast suggestion is as follows:
<times received [ ]>
If a sprite is waiting for next level to have been broadcasted twice, this could be used:
|wait until <<times received [next level]> = (2) >|
Thank you for reading this. If any clarifications are required, please ask.
Last edited by Clean0nion (2011-12-17 08:26:40)
Offline
i think it should be (most recent broadcast) because if you think about it,
<[] recieved> will only be true for 1 millisecond, and also having it as a reporter beans you can add it to a list or set a variable to it. Using this block, this script could be used to have a list that is updated every time a new broadcast is recieved.
When green flag clicked
forever
set [recent broadcast v] to (most recent broadcast)
add (recent broadcast) to [broadcast list v]
wait until <not < (recent broadcast) = (most recent broadcast) > >
end forever
Then you can work out how many times a broadcast is on the broadcast list using a suitable script.
Offline
joefarebrother wrote:
i think it should be (most recent broadcast) because if you think about it,
<[] recieved> will only be true for 1 millisecond, and also having it as a reporter beans you can add it to a list or set a variable to it. Using this block, this script could be used to have a list that is updated every time a new broadcast is recieved.
When green flag clicked
forever
set [recent broadcast v] to (most recent broadcast)
add (recent broadcast) to [broadcast list v]
wait until <not < (recent broadcast) = (most recent broadcast) > >
end forever
Then you can work out how many times a broadcast is on the broadcast list using a suitable script.
True, but I meant < received [ ] ? > as in <Has this message been broadcasted?>
Offline