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

#1 2008-07-19 21:47:01

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Weird AI

How come this script isn't working?

<forever>
<if><color[ left wheels ]is over[ outline of road
<turn cw( <{ AI Speed  }>  )degrees>

And vice versa for the other side. I set the AI Speed to 4, and that isn't working! So than I do

<turn cw( (( <{ AI Speed }>  <*> 2  )) )degrees>

And it still doesn't work. t worked with my Racer game, why isn't it working now?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#2 2008-07-19 21:56:30

the_guardian
Scratcher
Registered: 2008-03-16
Posts: 98

Re: Weird AI

First you need to determine if the color detection isn't working or if the turn isn't working.  I would put a say block before the turn block.  say "about to turn".
If you never see the message, your color detection isn't working.
If the color detection is working, try temporarily putting 4 in the turn variable instead of your AI Speed variable to rule that out.


Guardian 3D!  http://scratch.mit.edu/projects/the_guardian/169865

Offline

 

#3 2008-07-19 21:58:42

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Weird AI

the_guardian wrote:

First you need to determine if the color detection isn't working or if the turn isn't working.  I would put a say block before the turn block.  say "about to turn".
If you never see the message, your color detection isn't working.
If the color detection is working, try temporarily putting 4 in the turn variable instead of your AI Speed variable to rule that out.

Alright. I'll try that. Oh, 60 seconds hasn't passed. It isn't that sensing that's the issue, but when I muliply by a bigger number,i t turns WAY offthe track (I also took out the variable)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#4 2008-07-20 05:23:41

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

Re: Weird AI

if it is turning but it is finding staying on the track hard try checking out the centre of rotation of the sprite and maybe move it further back.


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

Offline

 

Board footer