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

#1 2009-11-03 18:38:15

samurai768
Scratcher
Registered: 2009-07-21
Posts: 1000+

Is there a better script for this?

Im making a one sprite script game and for the save code it checks the color its touching.

To sense the color, i made this script:
[blocks]
<go to x sad  216 )y sad  24
<if><touching color[
<set>{Code  }to( 1
[/blocks]
And there are about 72 other X/Y's it needs to go to and sense.
is there a better way without messing up the one sprite one script feature?

Last edited by samurai768 (2009-11-03 18:38:32)

Offline

 

#2 2009-11-03 19:03:38

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Is there a better script for this?

Make 2 lists called X;Y and variable called Index. Put the Xs and Ys in there. Then:

http://img688.imageshack.us/img688/9389/80027080.gif


Hai.

Offline

 

#3 2009-11-04 20:06:22

samurai768
Scratcher
Registered: 2009-07-21
Posts: 1000+

Re: Is there a better script for this?

Thank You!

Offline

 

#4 2009-11-04 20:47:23

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Is there a better script for this?

You are welcome.  smile  Thank you for thanking me!


Hai.

Offline

 

Board footer