Discuss Scratch

Ribsy2009
Scratcher
5 posts

Does the "If Touching <Sprite>" detect hidden objects?

If I have a hidden object (let's call it “Hidey”), will it be detected if the main sprite has the command “If touching Hidey then <whatever>” and the main sprite is touching the hidden object?

I know.. it's a mouthful of words, but does anyone know? I guess I could try it out, but you guys might have a quick answer for me… Thanks!

I am planning to make a Mario game, but differently then everyone else makes it, so I am planning how I will make the game

Check up in a couple of weeks and you might see a completed version soon

Thanks in advance!
-Ribsy2009
drmcw
Scratcher
1000+ posts

Does the "If Touching <Sprite>" detect hidden objects?

If a sprite is hidden with
hide
then it won't be detected. If however it is hidden with
set [ghost v] effect to (100)
then it will be detected.

Last edited by drmcw (Sept. 10, 2014 06:38:34)

stickfiregames
Scratcher
1000+ posts

Does the "If Touching <Sprite>" detect hidden objects?

It doesn't detect hidden objects. But it does detect objects with a ghost effect of 100.
Edit: Ninja'd!

Last edited by stickfiregames (Sept. 10, 2014 06:41:27)

srelun
Scratcher
8 posts

Does the "If Touching <Sprite>" detect hidden objects?

stickfiregames wrote:

It doesn't detect hidden objects. But it does detect objects with a ghost effect of 100.
Edit: Ninja'd!
Does it work the same for mouse-pointer when object is hidden?
Ribsy2009
Scratcher
5 posts

Does the "If Touching <Sprite>" detect hidden objects?

Okay thanks guys, I appreciate the help!
DadOfMrLog
Scratcher
1000+ posts

Does the "If Touching <Sprite>" detect hidden objects?

As others have said above, no, a sprite does not detect when touching a hidden sprite.

However, note that a hidden sprite can, in its own scripts, detect when it is touching a non-hidden sprite. Also, a hidden sprite does detect when it is touching the mouse-pointer.

In other words, the situation is not symmetric: non-hidden sprites don't detect hidden things, but hidden sprites do detect non-hidden things.
(I guess it kinda makes sense, though be careful about the mouse-pointer one…)

Last edited by DadOfMrLog (Nov. 21, 2014 15:48:22)

MadCheezit
Scratcher
3 posts

Does the "If Touching <Sprite>" detect hidden objects?

I've been wondering about non-hidden Sprites, but with transparent parts that I do want to sense. (Like the spaces between text.) Can anyone help me?
Photoguy77
Scratcher
100+ posts

Does the "If Touching <Sprite>" detect hidden objects?

MadCheezit wrote:

I've been wondering about non-hidden Sprites, but with transparent parts that I do want to sense. (Like the spaces between text.) Can anyone help me?
You could probably check if you are touching the color of the spaces.
mgebscratch
Scratcher
17 posts

Does the "If Touching <Sprite>" detect hidden objects?

Thank you everyone! Just checking this out: I was trying to make a Hide-and-Seek game and couldn't figure out how to detect objects! Thanks so much!
BF10
Scratcher
500+ posts

Does the "If Touching <Sprite>" detect hidden objects?

mgebscratch wrote:

Thank you everyone! Just checking this out: I was trying to make a Hide-and-Seek game and couldn't figure out how to detect objects! Thanks so much!
Make your own thread instead of necrobumping.
BlueBalloon11
Scratcher
4 posts

Does the "If Touching <Sprite>" detect hidden objects?

drmcw wrote:

If a sprite is hidden with
hide
then it won't be detected. If however it is hidden with
set [ghost v] effect to (100)
then it will be detected.

thank you drmcw for your response - it helped me a lot. I used it to make the project https://scratch.mit.edu/projects/654770193!
Harakou
Scratcher
1000+ posts

Does the "If Touching <Sprite>" detect hidden objects?

BlueBalloon11 wrote:

drmcw wrote:

If a sprite is hidden with
hide
then it won't be detected. If however it is hidden with
set [ghost v] effect to (100)
then it will be detected.

thank you drmcw for your response - it helped me a lot. I used it to make the project https://scratch.mit.edu/projects/654770193!
That's great, but this topic is very old - when you post, it bumps it all the way back to the top of the page which adds clutter and can confuse people who think it's new. Make sure you only post on topics that are still relevant. If you want to thank him, you could do so on his profile. Thanks!

Powered by DjangoBB