This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-03-08 23:55:17

echristophy
New Scratcher
Registered: 2013-02-28
Posts: 17

Touching hidden objects?

I'm trying to make a maze-type game. The idea is that the background is a group of squares, each containing a symbol. A sprite travels among the squares, but it has to only touch certain symbols. If it touches the wrong one, it has to start back at the beginning. I made a sprite that is the grid of the wrong squares. When my traveling sprite "touches" the grid, the level resets. Which works perfectly until I hide the grid. Then the traveling sprite goes right through the grid as if it wasn't there. According to this thread: http://scratch.mit.edu/forums/viewtopic.php?id=28 that shouldn't happen - even when hidden, the grid should be able to touch the moving sprite. What am I doing wrong? The "touching" code is in the grid script, not the moving sprite's script.

Offline

 

#2 2013-03-08 23:58:31

lion44
Scratcher
Registered: 2012-12-01
Posts: 39

Re: Touching hidden objects?

Don't worry.  It happens with me too.
-lion44

Offline

 

#3 2013-03-09 10:35:32

Smozzick
Scratcher
Registered: 2011-10-23
Posts: 100+

Re: Touching hidden objects?

Hide doesn't work like that. Instead of using hide try using ghost 99 or ghost 100.

The thread you linked to points out that hidden objects can detect using the if touching block but that it won't work in the inverse.

Last edited by Smozzick (2013-03-09 10:36:43)


http://i50.tinypic.com/ded8m.png

Offline

 

#4 2013-03-09 14:04:50

echristophy
New Scratcher
Registered: 2013-02-28
Posts: 17

Re: Touching hidden objects?

Thank you. Ghosting does work.

Offline

 

Board footer