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

#1 2011-10-20 17:39:58

voop556
New Scratcher
Registered: 2011-10-20
Posts: 3

Need some help with user interaction.

I have a sprite moving around randomly, and when that sprite is click I want a second sprite to appear and move. Please help!

Offline

 

#2 2011-10-20 18:13:04

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Need some help with user interaction.

In the first sprite:

<when[  Sprite1  ]clicked>
<broadcast[  MakeOtherSpriteGo  ]>


In the second sprite:

<when I receive[  MakeOtherSpriteGo  ]>
<show>
moving script

Last edited by MoreGamesNow (2011-10-20 18:13:17)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#3 2011-10-20 19:52:24

voop556
New Scratcher
Registered: 2011-10-20
Posts: 3

Re: Need some help with user interaction.

Thanks "MoreGamesNow," but does anybody know how to make the first sprite stop moving?

Offline

 

#4 2011-10-21 08:47:40

astroLoger
New Scratcher
Registered: 2011-10-16
Posts: 100+

Re: Need some help with user interaction.

After the broadcast on the first sprite, you could add something along the lines of this:

<forever>
<go to x sad  <x position> )y sad  <y position> )
<end>

Offline

 

#5 2011-10-21 08:50:57

astroLoger
New Scratcher
Registered: 2011-10-16
Posts: 100+

Re: Need some help with user interaction.

astroLoger wrote:

After the broadcast on the first sprite, you could add something along the lines of this:

<forever>
<go to x sad  <x position> )y sad  <y position> )
<end>

This would keep the first sprite staying in the same place, no matter where that is in theory.

Or

If you want it to disappear, just add the <hide> after the broadcast.

Offline

 

Board footer