Discuss Scratch
- Prinseskat
- Scratcher
1000+ posts
If (sprite name) showing? block
<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.
haha funny kumquat meme
- Prinseskat
- Scratcher
1000+ posts
If (sprite name) showing? block
Only Why not just<showing? :: looks>
We could also have a block like the current([ v] of [ v])but for booleans.
<showing? :: looks>makes sense, I guess. How would the
([ v] of [ v])block for booleans work/look though? (You can put booleans into the current block, though I don't think it'll work well.)
Last edited by Prinseskat (Dec. 2, 2014 09:03:14)
haha funny kumquat meme
- salvation_
- Scratcher
100+ posts
If (sprite name) showing? block
The if shown block would be like this
if <shown?> thenThis block could be used to find out if something is visible. Currently the only way to do this is to show a sprite that covers the whole screen, and then see if the sprite is touching that screen, and then hide the sprite that covers the whole screen. I am uncertain if this trick actually works. But if it does there is still a problem with this. The problem is that it when the project gets laggy it flashes the sprite making it visible and then invisible, so that half the time you can still see the sprite.
end
I make games on scratch especially Platformers.
Here are a few of them:
The Truth About The Brontosaurus
Triceratops A Scrolling Platformer
Space Cube
A Square With Hair
Bolt (A non-generic platformer)
I also made a really good bird's eye view tile engine with a talking engine, which you can find here
- Morimop
- Scratcher
1000+ posts
If (sprite name) showing? block
No Support.
show
set [shown? v] to [1]
hide
set [shown? v] to [0]
if <(shown?) = [1]> then
... :: grey
end
i literally have nothing to write here. huh.
- 4dsfunk
- Scratcher
100+ posts
If (sprite name) showing? block
I agree! The if shown block would be like thisif <shown?> thenThis block could be used to find out if something is visible. Currently the only way to do this is to show a sprite that covers the whole screen, and then see if the sprite is touching that screen, and then hide the sprite that covers the whole screen. I am uncertain if this trick actually works. But if it does there is still a problem with this. The problem is that it when the project gets laggy it flashes the sprite making it visible and then invisible, so that half the time you can still see the sprite.
end
all lives matter
- salvation_
- Scratcher
100+ posts
If (sprite name) showing? block
No Support.However if you have a lot of clones that wouldn't work for all of them. What if some clones are shown and some are not you would need this block!show
set [shown? v] to [1]
hide
set [shown? v] to [0]
if <(shown?) = [1]> then
... :: grey
end
I make games on scratch especially Platformers.
Here are a few of them:
The Truth About The Brontosaurus
Triceratops A Scrolling Platformer
Space Cube
A Square With Hair
Bolt (A non-generic platformer)
I also made a really good bird's eye view tile engine with a talking engine, which you can find here
- 4dsfunk
- Scratcher
100+ posts
If (sprite name) showing? block
YeaNo Support.However if you have a lot of clones that wouldn't work for all of them. What if some clones are shown and some are not you would need this block!show
set [shown? v] to [1]
hide
set [shown? v] to [0]
if <(shown?) = [1]> then
... :: grey
end
all lives matter
- Skywarslord
- Scratcher
100+ posts
If (sprite name) showing? block
Support.It would make lot of projects eaiser to make without having to put Variables after every show/hide and make things genarlly eaiser.
Grand Strategyphile
check out my most recent garbage (WARNING: by clicking on that link you agree to be subjected to a poorly scripted, badly drawn, bug-riddled mess which barley passes for a project)
https://scratch.mit.edu/projects/891951035/
say [dont expect me to be on after 3:35 PM lols]
- Wisst_Cat
- Scratcher
100+ posts
If (sprite name) showing? block
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?
(~˘▾˘)~ - This is HulaHula, she protects me from kumquats and helps correct my grammar.
–
Bored? Come play some of my games, here are some highlights:
An endless runner (kinda).
A cool space pong game.
or make your own! Wait… no ideas?
Use this link!
–
Remember, X Æ A-12 is pronounced Kyle!
- Morimop
- Scratcher
1000+ posts
If (sprite name) showing? block
Try to create a “sprite-only” variable and use broadcasts.YeaNo Support.However if you have a lot of clones that wouldn't work for all of them. What if some clones are shown and some are not you would need this block!show
set [shown? v] to [1]
hide
set [shown? v] to [0]
if <(shown?) = [1]> then
... :: grey
end
when I receive [is ... shown v]
if <(shown?) = [0]> then
... :: grey
end
i literally have nothing to write here. huh.
- salvation_
- Scratcher
100+ posts
If (sprite name) showing? block
Yes I want to use it in my game but it could also be useful for other people who are making similar projects. 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?
I make games on scratch especially Platformers.
Here are a few of them:
The Truth About The Brontosaurus
Triceratops A Scrolling Platformer
Space Cube
A Square With Hair
Bolt (A non-generic platformer)
I also made a really good bird's eye view tile engine with a talking engine, which you can find here
- salvation_
- Scratcher
100+ posts
If (sprite name) showing? block
Yes but this would only work for the sprite who uses the shown variable not for the clones.Try to create a “sprite-only” variable and use broadcasts.YeaNo Support.However if you have a lot of clones that wouldn't work for all of them. What if some clones are shown and some are not you would need this block!show
set [shown? v] to [1]
hide
set [shown? v] to [0]
if <(shown?) = [1]> then
... :: grey
endwhen I receive [is ... shown v]
if <(shown?) = [0]> then
... :: grey
end
I make games on scratch especially Platformers.
Here are a few of them:
The Truth About The Brontosaurus
Triceratops A Scrolling Platformer
Space Cube
A Square With Hair
Bolt (A non-generic platformer)
I also made a really good bird's eye view tile engine with a talking engine, which you can find here
- Vercte
- Scratcher
500+ posts
If (sprite name) showing? block
Actually, if you set it to sprite only, it DOES work for the clones. That's how you create a clone ID system.Yes but this would only work for the sprite who uses the shown variable not for the clones. ~snippity snip snip~
not that active anymore
_________
Seriously. Period. I'm not that active anymore. I've recently realised that Scratch, while good for basic programing, is just not that versatile for making games. So, I've moved on to engines like Roblox and Stencyl, which are entirely different from scratch. Farewell.
- salvation_
- Scratcher
100+ posts
If (sprite name) showing? block
How do you set it to sprite only is their a way to make the message only go to clones or only go to sprites. Because if so that would be great except I don't know how to use it!Actually, if you set it to sprite only, it DOES work for the clones. That's how you create a clone ID system.Yes but this would only work for the sprite who uses the shown variable not for the clones. ~snippity snip snip~
I make games on scratch especially Platformers.
Here are a few of them:
The Truth About The Brontosaurus
Triceratops A Scrolling Platformer
Space Cube
A Square With Hair
Bolt (A non-generic platformer)
I also made a really good bird's eye view tile engine with a talking engine, which you can find here
- Vercte
- Scratcher
500+ posts
If (sprite name) showing? block
This is how:How do you set it to sprite only is their a way to make the message only go to clones or only go to sprites. Because if so that would be great except I don't know how to use it!Actually, if you set it to sprite only, it DOES work for the clones. That's how you create a clone ID system.Yes but this would only work for the sprite who uses the shown variable not for the clones. ~snippity snip snip~
New Variable
o for all sprites o For this sprite only
^ click this, and it becomes personal to every clone!
Then,
when I start as a clone
hide
set [foo v] to [1]
if <(foo)=[1]> then
think [i am hidden]
end
not that active anymore
_________
Seriously. Period. I'm not that active anymore. I've recently realised that Scratch, while good for basic programing, is just not that versatile for making games. So, I've moved on to engines like Roblox and Stencyl, which are entirely different from scratch. Farewell.
- salvation_
- Scratcher
100+ posts
If (sprite name) showing? block
But that hides the clones what if you want the clones shown?This is how:How do you set it to sprite only is their a way to make the message only go to clones or only go to sprites. Because if so that would be great except I don't know how to use it!Actually, if you set it to sprite only, it DOES work for the clones. That's how you create a clone ID system.Yes but this would only work for the sprite who uses the shown variable not for the clones. ~snippity snip snip~
New Variable
o for all sprites o For this sprite only
^ click this, and it becomes personal to every clone!
Then,when I start as a clone
hide
set [foo v] to [1]
if <(foo)=[1]> then
think [i am hidden]
end
I make games on scratch especially Platformers.
Here are a few of them:
The Truth About The Brontosaurus
Triceratops A Scrolling Platformer
Space Cube
A Square With Hair
Bolt (A non-generic platformer)
I also made a really good bird's eye view tile engine with a talking engine, which you can find here
- Vercte
- Scratcher
500+ posts
If (sprite name) showing? block
It works the other way, just set it to zero.
not that active anymore
_________
Seriously. Period. I'm not that active anymore. I've recently realised that Scratch, while good for basic programing, is just not that versatile for making games. So, I've moved on to engines like Roblox and Stencyl, which are entirely different from scratch. Farewell.
- Nambaseking01
- Scratcher
1000+ posts
If (sprite name) showing? block
There is an older duplicate for this topic: https://scratch.mit.edu/discuss/topic/69728/
But since this topic contains more discussion, I'll report the two topics to be merged
But since this topic contains more discussion, I'll report the two topics to be merged
Hey there! My name is Nammy. I'm a male Forum Helper and Scratch Wiki Editor.
Profile | Test Account | Talk with me here! | Griffpatch is quitting Scratch?!
Profile | Test Account | Talk with me here! | Griffpatch is quitting Scratch?!
- coder2045
- Scratcher
1000+ posts
If (sprite name) showing? block
define showDone.
show
set [shown? v] to [1]
define hide
hide
set [shown? v] to [0]
<(shown?) = [1]>
Highlight this text and press Ctrl-Shift-Down to view more of my signature. There's a lot in there.
I FOUND THE POSTIE POSTIE POST LINK THIS
Brainteaser: What comes next? Answer on my profile. First correct answer gets a follow.
[ ]
[ [ ] ]
[ [ [ ] ] [ ] ]
Good projects ⬇️