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

#1 2012-08-31 03:56:01

sparky5000
Scratcher
Registered: 2011-01-31
Posts: 7

help with programing

how do i create an enimey to follow me around walls without crashing in to them and getting stuck or going right thought the wall ??????? any help would great.  smile

Offline

 

#2 2012-08-31 03:57:46

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: help with programing

Is what you want an AI?


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#3 2012-08-31 04:01:08

sparky5000
Scratcher
Registered: 2011-01-31
Posts: 7

Re: help with programing

somthing like that!!!!!!

Offline

 

#4 2012-08-31 04:09:01

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: help with programing

sparky5000 wrote:

somthing like that!!!!!!

when gf clicked
forever
if <(distance to [player v]) > [150]>
point towards [player v]
add (x position) to [x pos. v]
add (y position) to [y pos. v]
move (10) steps
if <touching [wall v]?>
set x to (item (last v) of [x pos. v])
set y to (item (last v) of [y pos. v])
end
end
There. Hope it works.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#5 2012-08-31 04:13:37

sparky5000
Scratcher
Registered: 2011-01-31
Posts: 7

Re: help with programing

i'll give it a try thanks!

Offline

 

#6 2012-08-31 09:29:32

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: help with programing

How is it?


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#7 2012-08-31 17:15:27

sparky5000
Scratcher
Registered: 2011-01-31
Posts: 7

Re: help with programing

sorry didn't really work in my project but it gave me another idea. thanks

Offline

 

#8 2012-08-31 17:23:00

sparky5000
Scratcher
Registered: 2011-01-31
Posts: 7

Re: help with programing

here is link to the project if you want to see it.

http://scratch.mit.edu/projects/sparky5000/2755659

Offline

 

Board footer