Discuss Scratch

jay11vad
Scratcher
30 posts

Need new block.

Hi,

is it possible to add a new block?

Like there is the Next costume block,
But there is no Previous costume block.
It is very hard to switch to the last costume when there are more than 4 costumes for a sprite:
This is what I mean:

https://lh3.googleusercontent.com/FLtqW_GYtq1HCMsdIdQ4T-HJb8MthfXDfKli8vaX0XQX0711e1PVpx5pxTzHq3iN24mEP-k=s170

It also needs a few more blocks:

I also think it would be much better if you added:
https://lh3.googleusercontent.com/5fwhL5vZGn-YF7KgyTPRZJUYdThE_hYL0N9QJYO-KJPHfAXXipN4ECRbWA-52-oQvKmho9E=s1704
and…
https://lh3.googleusercontent.com/D7m7SsHsR8CKPynGk0g3PTlB-ShFdX9eSGyLyF9Q9-s2Pa1cMLWitjU9cio8sQJyL1HDVQs=s170

If these blocks were added, then I wouldn't need to use so many ‘broadcast message’ blocks - It would be much easier.

also,
https://lh3.googleusercontent.com/wEaL7GEqSlYtIaEzPkbaPpVdIAGODiPs3S68vuoPxLkevA7vL4iEkzNZ4wf6tDcbXCMnQg=s170

I need this block because Whenever I drag in ‘Pick random 1 to 10’, it picks 5 or 4 or something like that. But I want to pick BETWEEN the two. Not 9. I want it to pick either 1 or 10.

Also, instead of copying and pasting to each sprite, I think you should add an 'Apply to (dropdown selection of BACKDROP OR SPRITE) : (dropdown selection of sprites or backdrops that the user has)
Like this:
https://lh3.googleusercontent.com/YYsp-IJP1mwSyoA1T1JP01UjCx_oCaWh8gnr_Exkp2hKnU4b1NEICM9wVoPSHabv-GDu3A=s170

(the pictures are quite blurry)
And the dropdown selection bit could look like this:
https://lh3.googleusercontent.com/08Djb59ZjIGahBCIusDHx_yz7g7qVBJdM1HGMU8-wnF-p-oKplENTyfyZS8jOw1sXXSCBQ=s170

Full image:
https://www.bing.com/images/blob?bcid=REMDudGlbS0C.Q

And finally, Just one more suggestion for a block:
Is it possible to have a block that links this project with another project?
like this:
https://www.bing.com/images/blob?bcid=ROx4UL6C0y0Cmw
or this:?
https://www.bing.com/images/blob?bcid=RFE2hZKcxS0Cog

So, if you don't understand, I mean when you click on a sprite, it brings you to another scratch project or someone else's project.

If there are any alternative ways of doing any of these things, please tell me
The last idea is just a random idea

by jay11vad
LionOte
Scratcher
37 posts

Need new block.

You want a
previous costume :: looks
block? Yeah, something like that would be better in the Suggestions category. Try posting there.

Here's a simple workaround:
switch costume to ((costume #) - (1))
StampDanFan
Scratcher
100+ posts

Need new block.

Sorry, but currently, Scratch can't bring you to another scratch project using code,
or apply code to multiple sprites. You could request these in the “Requests forum”.

For the pick random of two numbers block, you could use a workaround, like making a list of the two numbers, and picking a random one:
(item (pick random (1) to (2)) of [list v] :: list) 

Hope this helped.
jay11vad
Scratcher
30 posts

Need new block.

Where can I find -
(costume #)

…on the online scratch?

And, Will this work for a Search engine?

when green flag clicked

Last edited by jay11vad (Dec. 21, 2020 20:24:57)

StampDanFan
Scratcher
100+ posts

Need new block.

jay11vad wrote:

Where can I find -
(costume #)

…on the online scratch?
It should be under the looks section as
(costume [number v])
In the dropdown, you can choose costume name.

Last edited by StampDanFan (Dec. 21, 2020 20:24:10)

jay11vad
Scratcher
30 posts

Need new block.

This:
switch costume to [((costume name) - (1)) v]

…Only works once. I did try that but I've got 29 costumes for my sprite. It was on ‘flying cat 1’ and it did work - when I pressed space it went to ‘black cat’ - which was good, but then when I pressed space again, it did not switch to the costume ‘white cat’. Is there another solution?

Last edited by jay11vad (Dec. 21, 2020 20:48:33)

HTML_JAVASCRIPT_CSS
Scratcher
100+ posts

Need new block.

jay11vad wrote:

This:
switch costume to [((costume name) - (1)) v]

…Only works once. I did try that but I've got 29 costumes for my sprite. It was on ‘flying cat 1’ and it did work - when I pressed space it went to ‘black cat’ - which was good, but then when I pressed space again, it did not switch to the costume ‘white cat’. Is there another solution?

Yes…
when [space v] key clicked :: events hat
switch costume to ((costume [number v] :: looks) - (1))
jay11vad
Scratcher
30 posts

Need new block.

Will this work for a search engine:

when green flag clicked
switch backdrop to [Backdrop startpage v]
ask [] and wait
if <(answer) = [Banana]> then
switch backdrop to [Backdrop1 v]

end
jay11vad
Scratcher
30 posts

Need new block.

jay11vad wrote:

This:
switch costume to [((costume name) - (1)) v]

…Only works once. I did try that but I've got 29 costumes for my sprite. It was on ‘flying cat 1’ and it did work - when I pressed space it went to ‘black cat’ - which was good, but then when I pressed space again, it did not switch to the costume ‘white cat’. Is there another solution?


HTML_JAVASCRIPT_CSS
Scratcher
100+ posts

Need new block.

jay11vad wrote:

Will this work for a search engine:

when green flag clicked
switch backdrop to [Backdrop startpage v]
ask [] and wait
if <(answer) = [Banana]> then
switch backdrop to [Backdrop1 v]

end
I don't understand.
codinglah
Scratcher
100+ posts

Need new block.

jay11vad wrote:

Will this work for a search engine:

when green flag clicked
switch backdrop to [Backdrop startpage v]
ask [] and wait
if <(answer) = [Banana]> then
switch backdrop to [Backdrop1 v]

end
I think so, if I understood you correctly.
bjmoore2007
Scratcher
32 posts

Need new block.

can i sugest an block ? it takes 2 or more lists and one var and it compares how many letters each word has from all items in an list if the var is an sentence it breaks it down into words this would be really helpfull in making an chatroom that bans on bad language or then requires u to us savechat it could be an basic AI block that could be implemented into scratch if developers feel like it
codinglah
Scratcher
100+ posts

Need new block.

bjmoore2007 wrote:

can i sugest an block ? it takes 2 or more lists and one var and it compares how many letters each word has from all items in an list if the var is an sentence it breaks it down into words this would be really helpfull in making an chatroom that bans on bad language or then requires u to us savechat it could be an basic AI block that could be implemented into scratch if developers feel like it
Actually, cloud chatrooms are not allowed on Scratch. But yes, I think that would be useful. A workaround would be:
when green flag clicked
set [counter v] to (1)
repeat (length of (sentence))
if <(item (counter) of (sentence)) = [ ]> then
set [length v] to (length of (word))
add (length) to [lengths v]
add (word) to [words v]
change [counter v] by (1)
if <(words) contains (bad words :: list)?> then
say [Oops! A bad word is detected. Please re-phrase your sentence.]
stop [this script v]
end
else
set [word v] to (join (word) (item (counter) of (sentence)))
change [counter v] by (1)
end
end

Last edited by codinglah (Dec. 22, 2020 05:01:59)

jay11vad
Scratcher
30 posts

Need new block.

It definitely needs this block:

when costume switches to [ v]
jay11vad
Scratcher
30 posts

Need new block.

Also this:
If [ left-up v] pressed together then 
jay11vad
Scratcher
30 posts

Need new block.

It needs loads more blocks:
when Stop button clicked
jay11vad
Scratcher
30 posts

Need new block.

What is ‘Cloud’ in other people's projects?
deck26
Scratcher
1000+ posts

Need new block.

There is a separate Suggestions forum as has already been mentioned. This is not the forum for this.
bjmoore2007
Scratcher
32 posts

Need new block.

codinglah wrote:

bjmoore2007 wrote:

can i sugest an block ? it takes 2 or more lists and one var and it compares how many letters each word has from all items in an list if the var is an sentence it breaks it down into words this would be really helpfull in making an chatroom that bans on bad language or then requires u to us savechat it could be an basic AI block that could be implemented into scratch if developers feel like it
Actually, cloud chatrooms are not allowed on Scratch. But yes, I think that would be useful. A workaround would be:
when green flag clicked
set [counter v] to (1)
repeat (length of (sentence))
if <(item (counter) of (sentence)) = [ ]> then
set [length v] to (length of (word))
add (length) to [lengths v]
add (word) to [words v]
change [counter v] by (1)
if <(words) contains (bad words :: list)?> then
say [Oops! A bad word is detected. Please re-phrase your sentence.]
stop [this script v]
end
else
set [word v] to (join (word) (item (counter) of (sentence)))
change [counter v] by (1)
end
end
thx i will try this sometime in an chatbot maibe ? actually you could use this to detect the category an word is in like greetings info jokes fun and so on

Last edited by bjmoore2007 (Dec. 22, 2020 19:28:15)

jay11vad
Scratcher
30 posts

Need new block.

What do I do instead of this: because this is not a real block???
'
when costume switches to [ v]


???

or:
'
If costume switches to [ v]

Last edited by jay11vad (Dec. 22, 2020 20:27:43)

Powered by DjangoBB