Discuss Scratch

Inkay1954
Scratcher
75 posts

If (sprite name) showing? block

TwoBrothersJump wrote:

no we could just do

show
set [showing?] to [true]


hide
set [hiding?] to [true]


if <(showing) = [true]> then
... :: pen
end

Yeah, but not very efficient. Also, you don't have to make two variables, you can just do this:

show 
set [showing v] to [true]

hide
set [showing v] to [false]

Also, sometimes it can serve as a developer tool, and plus, it's less tedious. It also doesn't have to store as much data and thus you can save with less scripts.

I also desperately needed this block, but it never existed. So it does have a purpose.
han614698
Scratcher
1000+ posts

If (sprite name) showing? block

the2000 wrote:

IndianRuby718 wrote:

Probably like this:
<[sprite1 v] is [showing? v] :: sensing> 
It makes sense for it be a separate block, and worded like this instead of with “of” as it is for values.
Other possible options could be “visible?” and "draggable?"
I like this idea a lot. I support this.
I actually agree with the2000; +1.
Queer_Royalty
Scratcher
1000+ posts

If (sprite name) showing? block

I'm sorry, but this is a duplicate. In the future, please read the stickies before posting on the suggestions subforum.
dhfbei8987
Scratcher
1000+ posts

If (sprite name) showing? block

Queer_Royalty wrote:

I'm sorry, but this is a duplicate. In the future, please read the stickies before posting on the suggestions subforum.
No what are you talking about? This is the origin from 2014, and that's from 2016.
BloBBles_
Scratcher
51 posts

If (sprite name) showing? block

the only problem is, what if you want to detect if another sprite is showing

<[ v] showing?>
the2000
Scratcher
1000+ posts

If (sprite name) showing? block

the2000 wrote:

I like this idea a lot. I support this.
Learn to be constructive You're probably a loser who's nowhere near as handsome as me!

(Anyway, to finally make things right: I like the proposal of including it as a drop-down along with things like “draggable” because it gives more function to what would otherwise be a very specific block.)
MasterofTheBrick
Scratcher
1000+ posts

If (sprite name) showing? block

coder2045 wrote:

define show
show
set [shown? v] to [1]

define hide
hide
set [shown? v] to [0]

<(shown?) = [1]>
Done.

I don't understand. So many people don't support a suggestion just because there is a workaround? What about the “When this sprite clicked” block then?

when green flag clicked
wait until <<touching [mouse-pointer v] ?> and <mouse down?>>
script ::grey

Last edited by MasterofTheBrick (July 4, 2021 08:59:20)

BloBBles_
Scratcher
51 posts

If (sprite name) showing? block

Wisst_Cat wrote:

What are the uses for this? Are you looking for a specific use or many? If you're planning to use this in one project, do you think it can be used in other projects?

uses could be to detect a win in a last man standing game.
SmartCat3
Scratcher
500+ posts

If (sprite name) showing? block

Support. It would be useful for many projects
selfexplanatory
Scratcher
100+ posts

If (sprite name) showing? block

mockups:
<clone of [sprite v] [showing v]? ::looks>
<clone of [sprite v] [hidden v]? ::looks>
<[sprite v] [showing v]? ::looks>
<[sprite v] [hidden v]? ::looks>
selfexplanatory
Scratcher
100+ posts

If (sprite name) showing? block

MasterofTheBrick wrote:

coder2045 wrote:

define show
show
set [shown? v] to [1]

define hide
hide
set [shown? v] to [0]

<(shown?) = [1]>
Done.

I don't understand. So many people don't support a suggestion just because there is a workaround? What about the “When this sprite clicked” block then?

when green flag clicked
wait until <<touching [mouse-pointer v] ?> and <mouse down?>>
script ::grey
with forever loop around it
oh and also these blocks:
clear graphic effects

change size by ()

go to x: () y: (0)

turn cw () degrees

point in direction (mouse-pointer v)

go to [random position v]

go to [mouse pointer v]

change x by ()

change y by ()

(volume) //just make a variable called volume and every single time you change the volume set the variable to the value

change volume by ()

when [ v] > (10)

forever //just put repeat until something that will always be false

end

glide () secs to x: (0) y: (0)

glide () secs to [random position v] ::motion

glide () secs to [mouse-pointer v] ::motion

move () steps ::motion
lovelimpan
Scratcher
100+ posts

If (sprite name) showing? block

Prinseskat wrote:

<if (sprite name) showing?>
A boolean reporter saying whether or not a sprite is onscreen and you can see it. I'm not aware of a particularly easy workaround.
MUST BE ADDED IT HELPS ALOT!
The2AndOnly
Scratcher
88 posts

If (sprite name) showing? block

Morimop wrote:

No Support.

show
set [shown? v] to [1]

hide
set [shown? v] to [0]

if <(shown?) = [1]> then
... :: grey
end
I don't see why you don't support it because it's a very simple feature that is very useful and doing it this way costs a variable and slightly complicated for new users. If scratch can add a “mouse down?” block then they can add a “showing?” block with no effort.
Queer_Royalty
Scratcher
1000+ posts

If (sprite name) showing? block

The2AndOnly wrote:

Morimop wrote:

No Support.

show
set [shown? v] to [1]

hide
set [shown? v] to [0]

if <(shown?) = [1]> then
... :: grey
end
I don't see why you don't support it because it's a very simple feature that is very useful and doing it this way costs a variable and slightly complicated for new users. If scratch can add a “mouse down?” block then they can add a “showing?” block with no effort.
8The
<mouse down?>
does not have an easy workaround. Also it is a basic concept of most programming languages, and was likely not hard to implement. That is why it was necessary to add for beginners. The “<sprite showing>” block would not be used very often by beginners – it took me a long time to figure out the show and hide blocks, whereas variables are relatively easy to work with if you know what they are.

If the Scratch Team added every block that they could add, then the website would get no other features, the blocks would become cluttered and messy, and beginners would spend a lot of time just trying to figure out where everything is.8
KeenanG4
Scratcher
75 posts

If (sprite name) showing? block

Support! I see how this can be awesome, like some sort of respawned sound in a platformer.
weloveipad2
New Scratcher
94 posts

If (sprite name) showing? block

Queer_Royalty wrote:

The2AndOnly wrote:

Morimop wrote:

No Support.

show
set [shown? v] to [1]

hide
set [shown? v] to [0]

if <(shown?) = [1]> then
... :: grey
end
I don't see why you don't support it because it's a very simple feature that is very useful and doing it this way costs a variable and slightly complicated for new users. If scratch can add a “mouse down?” block then they can add a “showing?” block with no effort.
8The
<mouse down?>
does not have an easy workaround. Also it is a basic concept of most programming languages, and was likely not hard to implement. That is why it was necessary to add for beginners. The “<sprite showing>” block would not be used very often by beginners – it took me a long time to figure out the show and hide blocks, whereas variables are relatively easy to work with if you know what they are.

If the Scratch Team added every block that they could add, then the website would get no other features, the blocks would become cluttered and messy, and beginners would spend a lot of time just trying to figure out where everything is.8
I don't really get how it would be difficult for hide and show blocks, and that's another suggestion lol
Jackson49_test
Scratcher
100+ posts

If (sprite name) showing? block

Bump
TheAnimalKingdom42
Scratcher
1000+ posts

If (sprite name) showing? block

Bring up (someone else's) topic.
-ErrorPurpl_157
Scratcher
100+ posts

If (sprite name) showing? block

Like this?
<sprite (… v) clone (… v) showing? :: looks> // if you put zero in the clone section it will show information on the original sprite
medians
Scratcher
1000+ posts

If (sprite name) showing? block

<[sprite v] [showing v]? ::looks>
<[sprite v] [hiding v]? ::looks>
<[all sprites v] [showing v]? ::looks>
<[this sprite v] [showing v]? ::looks>
<[any sprite v] [showing v]? ::looks>
<[clone v] of [sprite v] [showing v]? ::looks> //changing it to clone adds this
<[clone v] of [this sprite v] [showing v]? ::looks> //changing it to clone adds this
<[this clone v] of [this sprite v] [showing v]? ::looks> //changing it to clone adds this
<[all clones v] of [this sprite v] [showing v]? ::looks> //changing it to clone adds this
<[clone v] of [any sprite v] [showing v]? ::looks> //changing it to clone adds this
<[clone v] of [all sprites v] [showing v]? ::looks> //changing it to clone adds this
Also:
when green flag clicked
set [page v] to [1]

Last edited by medians (Nov. 4, 2022 18:38:54)

Powered by DjangoBB