Discuss Scratch

BrodoIsAYai
New Scratcher
2 posts

How do I have a sprite Clicked, Broadcast a message, and When it's clicked after the message, It'll broadcast a new One?

whenthisspriteclicked
broadcast PLAYERTWO
whenthisspriteclicked
broadcast GAMESTART
My Dad says It's Only One thing Done, But can I get it to have Both?
BrodoIsAYai
New Scratcher
2 posts

How do I have a sprite Clicked, Broadcast a message, and When it's clicked after the message, It'll broadcast a new One?

Help Please!
LuckyLucky7
Scratcher
1000+ posts

How do I have a sprite Clicked, Broadcast a message, and When it's clicked after the message, It'll broadcast a new One?

Yes, both messages will be done at the same time unless you put a block like this:
broadcastandwait
Wahsp
Scratcher
1000+ posts

How do I have a sprite Clicked, Broadcast a message, and When it's clicked after the message, It'll broadcast a new One?

whenthisspriteclickedbroadcast...wait.1secswaituntiltouchingmouse pointerandmousedownbroadcast...
TheRealNetherBefore
Scratcher
1000+ posts

How do I have a sprite Clicked, Broadcast a message, and When it's clicked after the message, It'll broadcast a new One?

Or you could do this:
whenclickedsetbroadcastto1whenthisspriteclickedifbroadcast=1thenbroadcastthing1changebroadcastby1elsebroadcastthing2
-ShadowOfThePast-
Scratcher
100+ posts

How do I have a sprite Clicked, Broadcast a message, and When it's clicked after the message, It'll broadcast a new One?

TheRealNetherBefore wrote:

<snip>

Wahsp wrote:

<snip>
This would also work…

whenclickedwaituntiltouchingmouse-pointer?andmousedown?broadcastmessage1waituntilnottouchingmouse-pointer?andmousedown?waituntiltouchingmouse-pointer?andmousedown?broadcastmessage2waituntilnottouchingmouse-pointer?andmousedown?. . .
mystery4000
Scratcher
100+ posts

How do I have a sprite Clicked, Broadcast a message, and When it's clicked after the message, It'll broadcast a new One?

TheRealNetherBefore wrote:

Or you could do this:
whenclickedsetbroadcastto1whenthisspriteclickedifbroadcast=1thenbroadcastthing1changebroadcastby1elsebroadcastthing2
Good example.

Wahsp wrote:

whenthisspriteclickedbroadcast...wait.1secswaituntiltouchingmouse pointerandmousedownbroadcast...
But wouldn’t this cause the:
whenthisspriteclicked
To activate twice?
LuckyLucky7
Scratcher
1000+ posts

How do I have a sprite Clicked, Broadcast a message, and When it's clicked after the message, It'll broadcast a new One?

mystery4000 wrote:

Wahsp wrote:

whenthisspriteclickedbroadcast...wait.1secswaituntiltouchingmouse pointerandmousedown?broadcast...
But wouldn’t this cause the:
whenthisspriteclicked
To activate twice?
Yes, which would cause the 2nd broadcast block to never execute, and therefore that script would be going in an infinite loop.

Powered by DjangoBB