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

#1 2011-10-03 22:44:27

my-chemical-romance
Scratcher
Registered: 2011-04-24
Posts: 1000+

If clicked block

I forget what they're called, but there should be an Ifspriteclicked block. the pointy blocks like

   <mouse down?>

but ifclicked, if touching mousepointer AND mouse down is very buggy and this seems like a better way to do it.

Offline

 

#2 2011-10-03 22:53:35

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: If clicked block

why don't you just use the if sprite clicked hat block


Posts: 20000 - Show all posts

Offline

 

#3 2011-10-03 23:05:30

my-chemical-romance
Scratcher
Registered: 2011-04-24
Posts: 1000+

Re: If clicked block

veggieman001 wrote:

why don't you just use the if sprite clicked hat block

because it's a hat block

Offline

 

#4 2011-10-03 23:26:17

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Re: If clicked block

Try
If mouse down?
If touching mouse pointer?
(Whatever you want)

<when green flag clicked>
<if><mouse down?>
<if><touching[ mouse pointer


http://blocks.scratchr.org/API.php?user=KrIsMa&amp;action=onlineStatus&amp;online=http://i49.tinypic.com/2pzic0m.png&amp;offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

#5 2011-10-03 23:44:55

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: If clicked block

Or if mouse down and touching mouse pointer.

But then a person could click somewhere and move their mouse onto the sprite. but it doens't matter.

Offline

 

#6 2011-10-04 00:07:31

helltank
Scratcher
Registered: 2010-05-21
Posts: 1000+

Re: If clicked block

Wait...

Why would you NOT use the hat block? Give me an example of a script in which you can't use the hat block.


Error:Signature could not load. Please wait for an indefinite amount of time, until you realize you're gullible and go off to look for another potentially interesting signature to stare at.

Offline

 

#7 2011-10-04 00:16:23

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: If clicked block

For 1s1s's I guess.

But you can just use the combination of mouse down and touching mouse.

Offline

 

#8 2011-10-04 02:11:17

my-chemical-romance
Scratcher
Registered: 2011-04-24
Posts: 1000+

Re: If clicked block

helltank wrote:

Wait...

Why would you NOT use the hat block? Give me an example of a script in which you can't use the hat block.

something that needs to be running to work? the hat block means that you can press the red button then press all the other buttons and break everything.

"but ifclicked, if touching mousepointer AND mouse down is very buggy and this seems like a better way to do it."

But you can just use the combination of mouse down and touching mouse.

Or if mouse down and touching mouse pointer.

Try
If mouse down?
If touching mouse pointer?
(Whatever you want)

can anyone read? the mouse down and touching pointer is stupidly buggy and really doesn't work properly.

Offline

 

#9 2011-10-04 05:23:56

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: If clicked block

my-chemical-romance wrote:

can anyone read? the mouse down and touching pointer is stupidly buggy and really doesn't work properly.

Hehehe yeah, the blocks will activate even when you hold the mouse down and then move it over the sprite (though I suppose you could get around that with excessive sensing, but ugh). Support!

Last edited by Chrischb (2011-10-04 05:25:29)


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

#10 2011-10-04 06:44:49

my-chemical-romance
Scratcher
Registered: 2011-04-24
Posts: 1000+

Re: If clicked block

only good way is to have loads of variables and sensors, not very useful for something so common

Offline

 

#11 2011-10-05 11:10:21

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Re: If clicked block

Wait until mouse down and touching mouse pointer.


http://blocks.scratchr.org/API.php?user=KrIsMa&amp;action=onlineStatus&amp;online=http://i49.tinypic.com/2pzic0m.png&amp;offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

#12 2011-10-05 11:27:07

my-chemical-romance
Scratcher
Registered: 2011-04-24
Posts: 1000+

Re: If clicked block

KrIsMa wrote:

Wait until mouse down and touching mouse pointer.

READ! It's been said here a lot, don't just read the title then think you know everything!

Please actually read the first post at least.

Offline

 

Board footer