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

#1 2011-12-29 11:05:29

jmryan
New Scratcher
Registered: 2011-12-24
Posts: 3

How do I stop 2 sprites on a collisoson course?

How do I make it so 2 blocks moving towards each other stop when they come into contact?

Offline

 

#2 2011-12-29 11:21:54

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: How do I stop 2 sprites on a collisoson course?

if i could post images, i would post a script

but:

forever:
{
move
if touching sprite2:
{
stop script
}
}

Offline

 

#3 2011-12-29 12:06:37

jmryan
New Scratcher
Registered: 2011-12-24
Posts: 3

Re: How do I stop 2 sprites on a collisoson course?

What do you mean by the "{" symbol

Offline

 

#4 2011-12-29 12:40:32

mcpNOVA
Scratcher
Registered: 2011-12-05
Posts: 100+

Re: How do I stop 2 sprites on a collisoson course?

I think this work work, put this as Sprite 1's script

_________
Iforever if
I touching sprite 2
I stop script
_____


http://i43.tinypic.com/n5fqcz.jpg

Offline

 

#5 2011-12-29 13:52:20

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: How do I stop 2 sprites on a collisoson course?

Put this on both sprites:

When green flag clicked
Repeat until touching [other sprite]
    [Moving script]
End repeat until


Why

Offline

 

Board footer