Discuss Scratch

everlina100
Scratcher
6 posts

Issues with the touch sensing between sprites

Hi everyone,

I'm having with this project: http://scratch.mit.edu/projects/28493660/
I want to be able to ‘game over’ when sprite 3 touches sprite 7.
I've tried lots of different things but the sprites just don't seem to recognize each other when they touch and the game keeps on going.
If someone could take a look that would be great.

Evie
Scratchifier
Scratcher
1000+ posts

Issues with the touch sensing between sprites

To do this type of detection, you need to forever, sense if touching sprite 7 on sprite 3.

when I receive [start game v]
forever

if <touching [sprite 7 v] ?> then
broadcast [game over v]
stop [script v]

end

end

Replace this with your current script.
everlina100
Scratcher
6 posts

Issues with the touch sensing between sprites

thanks for the tip but sadly it doesn't
work

thanks for trying

Evie
RPFluffy
Scratcher
1000+ posts

Issues with the touch sensing between sprites

offtopic, name your sprites it will help!

But anyways this should work:

Scratchifier wrote:

To do this type of detection, you need to forever, sense if touching sprite 7 on sprite 3.

when I receive [start game v]
forever

if <touching [sprite 7 v] ?> then
broadcast [game over v]
stop [script v]

end

end

Replace this with your current script.

Nothing Is EVER 100%, that is just an assumption.















Some important links: Here and here or need help click Here. Eats followers, Loves helping people.
My “..” and “…” are not spelling mistakes, it means that they are ways of telling someone that I can continue more about it and that the sentence isn't ended the best way. I like putting new indents and lines so I can split up what I am talking about.




































Some important links: Here and here or need help click Here. Eats followers, Loves helping people. Check this MMO out! Kiwi = Support WHAT THAT'S IMPOSSIBLE: Through the drop down ;)
if <> :: control cstart

else :: control
end
everlina100
Scratcher
6 posts

Issues with the touch sensing between sprites

Thanks Fluffy

Unfortunately, i've tried the script and renamed the sprites and it still not working.

I'll keep thinking.

Thanks for your help.
RPFluffy
Scratcher
1000+ posts

Issues with the touch sensing between sprites

everlina100 wrote:

Thanks Fluffy

Unfortunately, i've tried the script and renamed the sprites and it still not working.

I'll keep thinking.

Thanks for your help.

Renaming sprites is for convenience and knowing what is what

Have you made this in sprite 3?

Last edited by RPFluffy (Oct. 5, 2014 16:37:38)


Nothing Is EVER 100%, that is just an assumption.















Some important links: Here and here or need help click Here. Eats followers, Loves helping people.
My “..” and “…” are not spelling mistakes, it means that they are ways of telling someone that I can continue more about it and that the sentence isn't ended the best way. I like putting new indents and lines so I can split up what I am talking about.




































Some important links: Here and here or need help click Here. Eats followers, Loves helping people. Check this MMO out! Kiwi = Support WHAT THAT'S IMPOSSIBLE: Through the drop down ;)
if <> :: control cstart

else :: control
end
everlina100
Scratcher
6 posts

Issues with the touch sensing between sprites

Hi Fluffy, yes i've made those changes to both sprite 3 and sprite 7 (inverted), same result unfortunately.
Scratchifier
Scratcher
1000+ posts

Issues with the touch sensing between sprites

everlina100 wrote:

Hi Fluffy, yes i've made those changes to both sprite 3 and sprite 7 (inverted), same result unfortunately.


Your problem is that sprite 7 needs "when I receive game over, stop other scripts in sprite.

The sprite is receiving the game over broadcast, but the game over broadcast doesn't actually do much of anything.
everlina100
Scratcher
6 posts

Issues with the touch sensing between sprites

That works! Thanks very much Scratchifier.
Scratchifier
Scratcher
1000+ posts

Issues with the touch sensing between sprites

everlina100 wrote:

That works! Thanks very much Scratchifier.

Welcome! Scratch On!

Powered by DjangoBB