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

#1 2010-09-25 21:12:59

undacovabroda45
Scratcher
Registered: 2010-01-09
Posts: 40

clicking on stamped images help

if you go 2 http://scratch.mit.edu/projects/kgordon/598994 and see how he/she uses the sprites and stamps, how do you get the computer to recognize that? I'm making a project that uses difficulty, so the sprite varies in size, and i'm trying to get it to recognize where the mouse is according to the row, but it isnt working. Can someone help me please?

Last edited by undacovabroda45 (2010-09-25 21:13:32)


Here's a project that I think will really help people out
http://scratch.mit.edu/static/projects/undacovabroda45/1282323_sm.pnghttp://scratch.mit.edu/projects/undacovabroda45/1282323

Offline

 

#2 2010-09-26 06:01:22

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: clicking on stamped images help

Easy: Make a very small sprite (one dot will do). Then, make it run the script:

[blocks]
<when green flag clicked>
<forever>
<go to[ mouse/pointer ]
<if> <touching color[ whatever you're sensing ]>
<set{ touching object }to( 1 )}>
<end>
<if> <touching color[ whatever else you're sensing ]>
<set{ touching other object }to( 1 )}>
<end>

[/blocks]

...and so on

Good luck, hope it helped!  wink

What are you making, anyway?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#3 2010-09-26 08:38:45

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: clicking on stamped images help

Look at the script in the project in my sig (I helped write it).


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#4 2010-09-26 10:07:34

undacovabroda45
Scratcher
Registered: 2010-01-09
Posts: 40

Re: clicking on stamped images help

Hardmath123 wrote:

Easy: Make a very small sprite (one dot will do). Then, make it run the script:

[blocks]
<when green flag clicked>
<forever>
<go to[ mouse/pointer ]
<if> <touching color[ whatever you're sensing ]>
<set{ touching object }to( 1 )}>
<end>
<if> <touching color[ whatever else you're sensing ]>
<set{ touching other object }to( 1 )}>
<end>

[/blocks]

...and so on

Good luck, hope it helped!  wink

What are you making, anyway?

um, the problem with that is that i'm first making a 1s1s game and then it's a word search game, and then the only color it will be touching is either white [background] or black [letters] and i'm trying to develop a mathematical formula that relates the mouse coordinates to the letter coordinates


Here's a project that I think will really help people out
http://scratch.mit.edu/static/projects/undacovabroda45/1282323_sm.pnghttp://scratch.mit.edu/projects/undacovabroda45/1282323

Offline

 

#5 2010-09-26 10:58:01

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

Re: clicking on stamped images help

It actually checks x and y position when mouse is down.


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

 

#6 2010-09-26 11:27:08

undacovabroda45
Scratcher
Registered: 2010-01-09
Posts: 40

Re: clicking on stamped images help

juststickman wrote:

It actually checks x and y position when mouse is down.

i know that, but i think i've figured it out. But thanks anyways guys! i'll post a link when it's done. Expect it hopefully (but probably not) around the anniversary of LINE, the imfamous 1s1s game, in approximately 2 weeks.


Here's a project that I think will really help people out
http://scratch.mit.edu/static/projects/undacovabroda45/1282323_sm.pnghttp://scratch.mit.edu/projects/undacovabroda45/1282323

Offline

 

#7 2010-09-26 15:42:40

GraemeK
Scratcher
Registered: 2010-06-14
Posts: 73

Re: clicking on stamped images help

undacovabroda45 wrote:

um, the problem with that is that i'm first making a 1s1s game and then it's a word search game, and then the only color it will be touching is either white [background] or black [letters] and i'm trying to develop a mathematical formula that relates the mouse coordinates to the letter coordinates

Have a look at my project: Snakes and Ladders
http://scratch.mit.edu/projects/GraemeK/1313663

It uses lists for xpos and ypos to set the counter to the correct position


http://internetometer.com/image/13865.png

Offline

 

Board footer