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

#1 2012-06-06 09:14:06

TitsMcghee
New Scratcher
Registered: 2012-06-06
Posts: 5

Heat Seeking effect

Just curious as to how i would get a missile to seek an abject in scratch as i need it for a project

Offline

 

#2 2012-06-06 09:15:50

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Heat Seeking effect

Would this be helpful? http://wiki.scratch.mit.edu/wiki/Making … _the_Mouse
Just change it from the mouse to a sprite.

Offline

 

#3 2012-06-06 09:17:48

Andres-Vander
Scratcher
Registered: 2010-09-16
Posts: 1000+

Re: Heat Seeking effect

Oh you can always just have the missile sprite have "Point towards (x of) (y of)" of whatever object you want the missile to be guided towards, and then have it move forward spaces. For a missile graphic, you should draw it like this:
_____________________
|                           ||  \
|__________________||_/

Since the direction 90 is the default. That way, your missile will be actually aiming towards the stuff instead of flying sideways


http://www.gifsoup.com/view1/2260823/flugelhorn-feline-o.gif

Offline

 

#4 2012-06-06 09:27:39

TitsMcghee
New Scratcher
Registered: 2012-06-06
Posts: 5

Re: Heat Seeking effect

dankeshon

Offline

 

#5 2012-06-06 09:28:38

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Heat Seeking effect

A more complex way would have an array of positions to go to that way it would follow the path of the sprite, rather than just point to where it is on the screen


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#6 2012-06-06 09:30:12

Andres-Vander
Scratcher
Registered: 2010-09-16
Posts: 1000+

Re: Heat Seeking effect

zammer990 wrote:

A more complex way would have an array of positions to go to that way it would follow the path of the sprite, rather than just point to where it is on the screen

I think that's a little too complicated, especially if someone just wants to make a small game for a class or something in 15-30 minutes


http://www.gifsoup.com/view1/2260823/flugelhorn-feline-o.gif

Offline

 

#7 2012-06-06 09:33:59

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Heat Seeking effect

Andres-Vander wrote:

zammer990 wrote:

A more complex way would have an array of positions to go to that way it would follow the path of the sprite, rather than just point to where it is on the screen

I think that's a little too complicated, especially if someone just wants to make a small game for a class or something in 15-30 minutes

Yea I know, I was just suggesting another way. After posting that I started making one and it's almost finished


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#8 2012-06-06 11:52:33

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Re: Heat Seeking effect

 
[Easiest follow script please reply if this is not what you are looking for]
when gf clicked
repeat (100)
point towards [object v]
move (variable) steps
end
wait (1) secs

Last edited by KrIsMa (2012-06-06 11:53:19)


http://blocks.scratchr.org/API.php?user=KrIsMa&action=onlineStatus&online=http://i49.tinypic.com/2pzic0m.png&offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

#9 2012-06-07 04:00:15

TitsMcghee
New Scratcher
Registered: 2012-06-06
Posts: 5

Re: Heat Seeking effect

its ok ive got it now  big_smile

Offline

 

Board footer