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

#1 2010-04-28 17:19:50

infinitum3d
Scratcher
Registered: 2009-05-10
Posts: 100+

AI gradually turning to face Player?

Hi.

I am working on a REMIX of Dog_Fight by Wobbledobsy. I'm making it one player. I have the enemy airplane in motion and chasing the player's plane using

Forever:PointTowards(Player)

The glitchy part is, if the player goes off the screen and comes back on from the other side, the AI Plane 'snaps' around to face the player instantly. Is there any way to do a "Turn towards" (player) rather than a 'point toward' player?

Any and all suggestions are appreciated!

Thanks!

Offline

 

#2 2010-04-28 21:07:04

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: AI gradually turning to face Player?

I would reccomend using the


[blocks]<repeat until>[/blocks] block.



I like plane games, so I probably will check this out  smile

Last edited by 16Skittles (2010-04-28 21:08:07)


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#3 2010-04-29 13:53:27

infinitum3d
Scratcher
Registered: 2009-05-10
Posts: 100+

Re: AI gradually turning to face Player?

I'm sorry but I don't understand. Can you give me an example of how that would work?

Offline

 

#4 2010-04-29 14:17:41

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: AI gradually turning to face Player?

infinitum3d wrote:

I'm sorry but I don't understand. Can you give me an example of how that would work?

http://scratch.mit.edu/projects/justtestingstickman/1016938
Repeat until won't work because it works more slowly when in a loop.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

Board footer