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

#1 2011-05-14 14:12:43

CainInACan
New Scratcher
Registered: 2011-05-14
Posts: 8

How do I do this?

Hi all, this is my first post.
How do I program if touching a costume of a sprite?
Also, how can I make sprites move towards another sprite?
Thanks if anyone can answer :-)

Offline

 

#2 2011-05-14 14:23:20

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: How do I do this?

CainInACan wrote:

Hi all, this is my first post.
How do I program if touching a costume of a sprite?

Use this if you want a sprite to follow another.
http://imageshack.us/m/862/4007/touchingcostumeofsprite.gif
Change the two sprites to change which sprite you want it to react to and change the # in the = block to change the costume.

Also, how can I make sprites move towards another sprite?

http://imageshack.us/m/8/2239/followsprite.gif
Use the first scipt here for glitchy movement and the one below it for less glitchy. To change the speed change the # in the move block.

Hope this helps you!
Scratch On!!!

Last edited by SSBBM (2011-05-14 14:24:28)


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#3 2011-05-14 14:27:41

777w
Scratcher
Registered: 2009-02-10
Posts: 1000+

Re: How do I do this?

http://imageshack.us/m/843/2708/tutorialscripts.gif

Offline

 

#4 2011-05-14 14:28:45

777w
Scratcher
Registered: 2009-02-10
Posts: 1000+

Re: How do I do this?

SSBBM wrote:

CainInACan wrote:

Hi all, this is my first post.
How do I program if touching a costume of a sprite?

Use this if you want a sprite to follow another.
http://imageshack.us/m/862/4007/touchin … sprite.gif
Change the two sprites to change which sprite you want it to react to and change the # in the = block to change the costume.

Also, how can I make sprites move towards another sprite?

http://imageshack.us/m/8/2239/followsprite.gif
Use the first scipt here for glitchy movement and the one below it for less glitchy. To change the speed change the # in the move block.

Hope this helps you!
Scratch On!!!

DARN! You beat me to it! XD Mine were almost the same...

Offline

 

#5 2011-05-14 14:30:52

CainInACan
New Scratcher
Registered: 2011-05-14
Posts: 8

Re: How do I do this?

Thanks everyone!!  big_smile

Offline

 

#6 2011-05-14 15:30:40

CainInACan
New Scratcher
Registered: 2011-05-14
Posts: 8

Re: How do I do this?

Please help! I tried this and it didn't work:
When *flag* clicked
if touching sprite10 and costume # of sprite10=2
switch to costume explode
play sound correct
wait 0.1 secs
switch to costume fries

Any help would be awesome  big_smile

Offline

 

#7 2011-05-14 15:50:11

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: How do I do this?

CainInACan wrote:

Please help! I tried this and it didn't work:
When *flag* clicked
if touching sprite10 and costume # of sprite10=2
switch to costume explode
play sound correct
wait 0.1 secs
switch to costume fries

Any help would be awesome  big_smile

What exactly are you trying to do? Could you post a project?


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#8 2011-05-14 15:59:10

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: How do I do this?

CainInACan wrote:

Hi all, this is my first post.
How do I program if touching a costume of a sprite?
Also, how can I make sprites move towards another sprite?
Thanks if anyone can answer :-)

you have to do forever if, not if.


the the the the the

Offline

 

#9 2011-05-15 05:57:01

CainInACan
New Scratcher
Registered: 2011-05-14
Posts: 8

Re: How do I do this?

SSBBM wrote:

CainInACan wrote:

Please help! I tried this and it didn't work:
When *flag* clicked
if touching sprite10 and costume # of sprite10=2
switch to costume explode
play sound correct
wait 0.1 secs
switch to costume fries

Any help would be awesome  big_smile

What exactly are you trying to do? Could you post a project?

I'm trying to make it so that when one sprite touches the 2nd costume of another sprite, it switches to another costume and plays a sound, for 0.1 seconds, then switches back to the original costume.

Offline

 

#10 2011-05-15 06:08:14

CainInACan
New Scratcher
Registered: 2011-05-14
Posts: 8

Re: How do I do this?

Its ok, ive figured it out. thanks for the help and support everyone  big_smile

Offline

 

Board footer