I'd like a <Last Broadcast=[]>. It would work well if you want it to do one thing if the last broadcast was ___ and another thing if the last broadcast was ____. You could use something like
When ___ clicked
If <Last Broadcast=[Move -10 Steps]>
Move 10 steps
If <Last Broadcast=[Move 10 Steps]>
Move -10 steps.
(It would be a boolean)
I'm sure there's already a bypass for this, but Scratch is about being easy, right? And this has already probably been suggested, so if this is a duplicate, please tell me and I'll delete it.
Offline
Done. Simple enough
Just set the variable "Last Broadcast" to whatever you're broadcasting every time you broadcast something. ;D
And if it was going to be a custom block, it'd be a built-in variable, not a boolean, so you could do more with it like string manipulation and the like.
Offline
It would probably be better to just do (last broadcast).
Last edited by Greenatic (2011-09-05 20:25:45)
Offline
1.) You'd have to have many variables, and this'd work for a game that would include a lot of this.
2.) Greenatic, but then you wouldn't be able to make a difference if the last broadcast were, let's say Broadcast1 than Broadcast2. It wouldn't make a purpose...
Offline
Greenatic wrote:
It would probably be better to just do <last broadcast>.
You mean (last broadcast), right?
Because <last broadcast> would just say true/false, while (last broadcast) says the broadcast.
I believe (last broadcast) will be more efficient, because you can just combine it with <[] = []>
Offline
Oh, yeah, I guess (last broadcast) would be better, but probably harder to make.
Offline
kayybee wrote:
Greenatic wrote:
It would probably be better to just do <last broadcast>.
You mean (last broadcast), right?
Because <last broadcast> would just say true/false, while (last broadcast) says the broadcast.
I believe (last broadcast) will be more efficient, because you can just combine it with <[] = []>
Yeah, I'll fix that.
DeathWish wrote:
Greenatic, but then you wouldn't be able to make a difference if the last broadcast were, let's say Broadcast1 than Broadcast2. It wouldn't make a purpose...
<(last broadcast) = [ ]>. Plus, you would be able to manipulate it as a string, etc.
EDIT: Sorry DeathWish, didn't see your last post.
Last edited by Greenatic (2011-09-05 20:27:03)
Offline
Death_Wish wrote:
Oh, yeah, I guess (last broadcast) would be better, but probably harder to make.
And actually, it wouldn't be any harder. In fact, the code would even be a little shorter!
Offline
Greenatic wrote:
It would probably be better to just do (last broadcast).
Offline
scimonster wrote:
Greenatic wrote:
It would probably be better to just do (last broadcast).
Hey sci! Could you try making this and adding it to the block library?
Offline
ImagineIt wrote:
scimonster wrote:
Greenatic wrote:
It would probably be better to just do (last broadcast).
Hey sci! Could you try making this and adding it to the block library?
... I guess I forgot to add it when it was submitted. >.<
Offline
scimonster wrote:
ImagineIt wrote:
scimonster wrote:
Hey sci! Could you try making this and adding it to the block library?
... I guess I forgot to add it when it was submitted. >.<
You mean someone already made it?
Offline
Greenatic wrote:
scimonster wrote:
ImagineIt wrote:
Hey sci! Could you try making this and adding it to the block library?... I guess I forgot to add it when it was submitted. >.<
You mean someone already made it?
Yes.
Offline
What's the default value? I mean, what does it report if no broadcast has been sent? Nil? Green flag?
Offline
Greenatic wrote:
What's the default value? I mean, what does it report if no broadcast has been sent? Nil? Green flag?
Whatever you saved the image with.
Offline
I think that, with the advent of procedures and BYOB in Scratch 2.0, it will be easy to put cpumaster's script into a custom block. That would be the ideal solution to this problem that has been asked so many times!
Last edited by LS97 (2011-09-08 13:05:35)
Offline