This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Suggestions
  •  » an EXTREMELY important block I need! and maybe for others too

#1 2008-08-19 20:29:16

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

an EXTREMELY important block I need! and maybe for others too

the block is (drum roll) [turn towards{*sprite*}] and another [turn towards X: (**) Y: (**)] I really need this for AI's and stuff, also things like commandable vehicle, otherwise you'll have to replace the -180 to 180 with 0 to 360 in the (direction) and [point in direction (***)] blocks, really need this block MIT!

Last edited by dingdong (2008-08-19 20:29:35)


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

Offline

 

#2 2008-08-19 20:34:57

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: an EXTREMELY important block I need! and maybe for others too

I agree. Though, isn't point towards [Sprite_] the same as the turn towards? You can also make a sprite with the X and Y where you want another sprite to point towards, and make it point towards the sprite.

Offline

 

#3 2008-08-19 20:44:31

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

Re: an EXTREMELY important block I need! and maybe for others too

actually wait it should be: [turn towards {*sprite*} in (**) secs]


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

Offline

 

#4 2008-08-19 20:44:52

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: an EXTREMELY important block I need! and maybe for others too

I think you need to come up with a way to make a sprite turn towards another sprite. If scratch does all the hard programming things for you then you won't learn how to program. I know that making a sprite turn towards another sprite is entirely possible in scratch and you just need to find a way to make it work.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2008-08-19 21:25:08

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

Re: an EXTREMELY important block I need! and maybe for others too

archmage wrote:

I think you need to come up with a way to make a sprite turn towards another sprite. If scratch does all the hard programming things for you then you won't learn how to program. I know that making a sprite turn towards another sprite is entirely possible in scratch and you just need to find a way to make it work.

I have, the problem is that it can't turn in the fastest way possible, like it can't switch from -150 over to 150 turning left, it always goes right


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

Offline

 

#6 2008-08-20 04:50:09

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

Re: an EXTREMELY important block I need! and maybe for others too

ummm[blocks]<point towards( ] [/blocks] like arch said...

Last edited by yambanshee (2008-08-20 04:51:09)

Offline

 

#7 2008-08-20 06:51:51

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

Re: an EXTREMELY important block I need! and maybe for others too

Maybe there's a simpler way, but here's one approach you could use

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


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

Offline

 

#8 2008-08-21 04:20:17

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: an EXTREMELY important block I need! and maybe for others too

ive done something similar on at least two of my projects.  my pingpong game has an AI which points towards the point it thinks you are least likely to return the ball from and in my Quidditch world cup game your opponent turns towards the ball.  it is not particularly easy but it should not be too hard once you work it out.


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#9 2008-08-21 19:58:46

jwiens
Scratcher
Registered: 2007-10-17
Posts: 39

Re: an EXTREMELY important block I need! and maybe for others too

a hide mouse would be better like in flash. Oh man I love flash, please help me MIT

Offline

 
  • Index
  •  » Suggestions
  •  » an EXTREMELY important block I need! and maybe for others too

Board footer