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

#1 2008-12-06 08:34:41

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

How do you:

Make a rocket home in on something, but only has a certain turn rate (in other words, it would not be following you very closely, but swerving off track at times)

Offline

 

#2 2008-12-06 09:29:43

tharvoil
Scratcher
Registered: 2008-10-24
Posts: 24

Re: How do you:

I think if I understood what your trying to say right this should work assume person is the rockets target and rocket is well.... the rocket. You will alsol need a variable

<forever>
<set{ rocketpath }to( <pick random( 1 )to( 10 ))>
<if><( <{ rocketpath }> <<> 2 )>
<turn cw( 15 )degrees>
<move( 10 )steps>          <-Replace with however far you want it to move
<wait( .2 )secsc>
<else>
<point in direction( person)>
<move( 10 )steps>                <- once again replace with how far you want it to move
<wait( .2 )secsc>             <- Mess with the wait time to suit your needs lower time
                                           means itll move faster and probally less laggy


Hopefully that will do what you need.

Offline

 

#3 2008-12-06 10:29:39

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: How do you:

its gonna need some sencing but ill get you started on the right track. Just think of somehow that if the rocket needs to point more to the left in stead of just poiting to the sprite, turns to the left slowly. same with the right side aswell.

Offline

 

#4 2008-12-06 11:50:49

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: How do you:

I don't think you understand my goal. Have any of you, by any chance, played N (the game)? If yes, I want a rocket similar to the ones there.

A very BAD example: http://scratch.mit.edu/projects/bhz/343221

yambanshee wrote:

its gonna need some sencing but ill get you started on the right track. Just think of somehow that if the rocket needs to point more to the left in stead of just poiting to the sprite, turns to the left slowly. same with the right side aswell.

The whole reason I made this thread was to ask how to do that.

Last edited by bhz (2008-12-06 18:29:16)

Offline

 

Board footer