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)
Offline
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!
What are you making, anyway?
Offline
Look at the script in the project in my sig (I helped write it).
Offline
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!![]()
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
Offline
It actually checks x and y position when mouse is down.
Offline
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.
Offline
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
Offline