Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Does the "If Touching <Sprite>" detect hidden objects?
- Ribsy2009
-
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
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
-
1000+ posts
Does the "If Touching <Sprite>" detect hidden objects?
If a sprite is hidden with
hidethen 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
-
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!
Edit: Ninja'd!
Last edited by stickfiregames (Sept. 10, 2014 06:41:27)
- srelun
-
8 posts
Does the "If Touching <Sprite>" detect hidden objects?
Does it work the same for mouse-pointer when object is hidden? It doesn't detect hidden objects. But it does detect objects with a ghost effect of 100.
Edit: Ninja'd!
- Ribsy2009
-
5 posts
Does the "If Touching <Sprite>" detect hidden objects?
Okay thanks guys, I appreciate the help!
- DadOfMrLog
-
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…)
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
-
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
-
100+ posts
Does the "If Touching <Sprite>" detect hidden objects?
You could probably check if you are touching the color of the spaces. 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?
- mgebscratch
-
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
-
500+ posts
Does the "If Touching <Sprite>" detect hidden objects?
Make your own thread instead of necrobumping. 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!
- BlueBalloon11
-
4 posts
Does the "If Touching <Sprite>" detect hidden objects?
If a sprite is hidden withhidethen it won't be detected. If however it is hidden withset [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
-
1000+ posts
Does the "If Touching <Sprite>" detect hidden objects?
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.If a sprite is hidden withhidethen it won't be detected. If however it is hidden withset [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!

- Discussion Forums
- » Help with Scripts
-
» Does the "If Touching <Sprite>" detect hidden objects?