Discuss Scratch

creeper121212121212
Scratcher
1 post

new block?

maybe add a new block, with that nofications under the ‘events’ tab; a triangle version of “when I recieve … (signal 1 ordinarily)”.
to stick it to the “if” block, example:

when “flag” clicked
l repeat l
l turn 15 clockwise
llllllllllllllllllllllllllllllllllll
l if <WHEN I RECIEVE SIGNAL 1> l
l stop this script l
lllllllllllllllllllllllllllllllll

(l and llllllllllllllllllllllllllll means repeat and if side and down)
_nix
Scratcher
1000+ posts

new block?

So like this?

when flag clicked
forever
turn cw (15) degrees
if <I receive [signal 1 v] :: events> then
stop [this script v]
end
end

I think a fairly simple workaround would be something like this:

when flag clicked
set [signal 1 v] to [not sent]
forever
turn cw (15) degrees
if <(signal 1) = [sent]> then
stop [this script v]
end
end

when I receive [signal 1 v]
set [signal 1 v] to [sent]

(edit: fix typo)

Last edited by _nix (Dec. 25, 2016 16:15:49)

bigpuppy
Scratcher
1000+ posts

new block?

Hi - you can use the [scratchblocks] tag to use blocks:

[scratchblocks]
when green flag clicked
repeat (...)
turn cw (15) degrees
if <When I receive signal (1 v)::events> then
stop [this script v]
end
end
[/scratchblocks]

equals

when green flag clicked
repeat (...)
turn cw (15) degrees
if <When I receive signal (1 v)::events> then
stop [this script v]
end
end

You can also test out the [scratchblocks] tag here.
WolfCat67
Scratcher
1000+ posts

new block?

Sorry, but this idea is rejected:

The Rejections Sticky wrote:

<broadcast ___ received> boolean
There is way too much ambiguity to how this would work. Would it return true of the broadcast was fired at any point since the project was created, since the green flag was clicked, since something else was broadcasted, etc.? If you really want to do something like this, instead just make a variable and set it to 1 and use the equals block.

EDIT: Lots of posts at once when I was posting… ARGH.

Last edited by WolfCat67 (Dec. 25, 2016 16:19:49)

A_Geeky_Jawa
Scratcher
100+ posts

new block?

creeper121212121212 wrote:

when “flag” clicked
l repeat l
l turn 15 clockwise
llllllllllllllllllllllllllllllllllll
l if <WHEN I RECIEVE SIGNAL 1> l
l stop this script l
lllllllllllllllllllllllllllllllll

(l and llllllllllllllllllllllllllll means repeat and if side and down)

I see your new to Scratch, and the forums, so I'll just turn what you said into scratch blocks

when green flag clicked
repeat ()
if <I receive [ v] :: events> then
turn cw (15) degrees
end
end

BTW I support.
A_Geeky_Jawa
Scratcher
100+ posts

new block?

This is the first time I've been ninja'd on scratch lol
Harakou
Scratcher
1000+ posts

new block?

WolfCat67 wrote:

Sorry, but this idea is rejected:

The Rejections Sticky wrote:

<broadcast ___ received> boolean
There is way too much ambiguity to how this would work. Would it return true of the broadcast was fired at any point since the project was created, since the green flag was clicked, since something else was broadcasted, etc.? If you really want to do something like this, instead just make a variable and set it to 1 and use the equals block.

EDIT: Lots of posts at once when I was posting… ARGH.
Right - this block wouldn't really work like you think. Sorry!

Powered by DjangoBB