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

#1 2007-03-12 19:59:26

andymilburn
Scratcher
Registered: 2007-03-06
Posts: 2

Collision detection with hidden objects

I THINK that hidden objects can sometimes return true for "touching"
in the java-compiled browser-based version of a scratch project.
This appears to be different than the behavior of the same project
running in the Scratch app locally.

If this seems absurd or confusing, I'll try to work up a bit of test code
to isolate the problem...

Offline

 

#2 2007-03-13 10:00:10

jay
Scratch Team
Registered: 2007-03-11
Posts: 59

Re: Collision detection with hidden objects

You are 100% right about this. See this project for proof.

http://scratchr.org/projects/debugjay/371

We'll work on debugging that.

From project notes on debug project:
this project has two invisible cats, one on the left and one on the right. one is hidden via "set ghost to 100" while the other is hidden via "hide" block. the visible cat changes color when he is "touching" the cat on the right and whirls when "touching" the cat on the left. despite their invisibility, the collisions are detected. this is different from the behavior in the scrtach programming environment where the collisions are not detcted.

Offline

 

#3 2007-03-15 19:58:13

johnm
Scratcher
Registered: 2007-03-08
Posts: 100+

Re: Collision detection with hidden objects

This is fixed now. Note that even though you can't touch a sprite that is hidden, its scripts are still running and it can touch any non-hidden sprite. (So you can have a treasure sprite reveal itself when a character touches it.)

Last edited by johnm (2007-03-15 19:58:57)

Offline

 

#4 2011-05-26 16:13:00

Ashurathehedgehog
Scratcher
Registered: 2010-12-16
Posts: 100+

Re: Collision detection with hidden objects

andymilburn wrote:

I THINK that hidden objects can sometimes return true for "touching"
in the java-compiled browser-based version of a scratch project.
This appears to be different than the behavior of the same project
running in the Scratch app locally.

If this seems absurd or confusing, I'll try to work up a bit of test code
to isolate the problem...

Try going on the flash player, also...FIRST COMMENT IN 3 YEARS ON THIS BOARD!


Oh great. hit my 100th post. thankz liru.

Offline

 

#5 2011-05-26 17:15:45

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: Collision detection with hidden objects

Ashurathehedgehog wrote:

andymilburn wrote:

I THINK that hidden objects can sometimes return true for "touching"
in the java-compiled browser-based version of a scratch project.
This appears to be different than the behavior of the same project
running in the Scratch app locally.

If this seems absurd or confusing, I'll try to work up a bit of test code
to isolate the problem...

Try going on the flash player, also...FIRST COMMENT IN 3 YEARS ON THIS BOARD!

That's called a necropost. It makes you look stupid  tongue

We don't usually like reviving old(in this case, 3-year-old) topics from the dead.


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#6 2011-05-26 17:19:23

CloneCommando1
Scratcher
Registered: 2010-12-02
Posts: 500+

Re: Collision detection with hidden objects

I agree with scratch_yoshi. Except for the "makes you look stupid" part.  tongue


RANDOM THOUGHT: If the tomato is a fruit, doesn't that make ketchup a smoothie?

Offline

 

#7 2011-05-26 20:42:20

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Collision detection with hidden objects

scratch_yoshi wrote:

Ashurathehedgehog wrote:

andymilburn wrote:

I THINK that hidden objects can sometimes return true for "touching"
in the java-compiled browser-based version of a scratch project.
This appears to be different than the behavior of the same project
running in the Scratch app locally.

If this seems absurd or confusing, I'll try to work up a bit of test code
to isolate the problem...

Try going on the flash player, also...FIRST COMMENT IN 3 YEARS ON THIS BOARD!

That's called a necropost. It makes you look stupid  tongue

We don't usually like reviving old(in this case, 3-year-old) topics from the dead.

Yeah, necroposting isn't exactly something to be proud of.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer