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

#1 2008-09-07 00:49:47

Kamatchi
Scratcher
Registered: 2008-05-28
Posts: 3

How would I make this possible?

I want to make a awsome game but I need help, How can I get a Sprite to follow the Crusor?  And Recentlly this wouldn't work for me, how do I Broadcast somthing AFTER touching a certain color???

Offline

 

#2 2008-09-07 01:11:08

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: How would I make this possible?

follow cursor (also includes a glide):

[forever]
[go to X: ( ( (mouseX) / (10) ) ) Y: ( ( (mouseY) / (10) ) ) )]

color sensing:

[forever]
[if <touching color [] >]
    [broadcast {whatever}]


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#3 2008-09-07 06:13:26

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: How would I make this possible?

Take a look at this project...it has a sprite chasing the mouse.

http://scratch.mit.edu/projects/Paddle2SeeFixIt/245687


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-09-07 08:40:46

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How would I make this possible?

when green flag clicked
forever
   go to [mouse-pointer]
(to go to the mouse pointer)

or

forever
    point towards [mouse-pointer]
    move (5) steps
(to follow the cursor)

when green flag clicked
forever
    if < touching color [ ] >
    broadcast [ blah ]

Last edited by coolstuff (2008-09-07 08:41:49)

Offline

 

Board footer