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

#1 2012-09-05 13:04:47

blue80070
New Scratcher
Registered: 2012-08-22
Posts: 5

When sprite clicked as a boolean block

I know the workaround is very easy,

Wait until <<mouse down?>and<touching [mouse pointer v]?>>
But if you are doing this a lot, it can take a while, so it we quicker to have when sprite clicked as a boolean block, eg:

Wait until  <[sprite] clicked>

Offline

 

#2 2012-09-05 13:11:18

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: When sprite clicked as a boolean block

Something that simple doesn't need a new block.  hmm

Offline

 

#3 2012-09-05 13:58:39

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: When sprite clicked as a boolean block

I just use the "duplicate" function if I'm going to use it a lot.


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#4 2012-09-05 14:02:22

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: When sprite clicked as a boolean block

The above 2 posts +1


http://i50.tinypic.com/312u714.jpg

Offline

 

#5 2012-09-05 14:45:17

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: When sprite clicked as a boolean block

In 2.0, you can byob that does this. Just define it with that script.


Why are the secret organizations getting all the attention?  mad

Offline

 

#6 2012-09-05 15:02:01

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: When sprite clicked as a boolean block

sonicfan12p wrote:

In 2.0, you can byob that does this. Just define it with that script.

2.1, or maybe even later. 2.0 won't support custom booleans or reporters.  sad

Offline

 

#7 2012-09-05 15:26:01

xJira
Scratcher
Registered: 2012-03-24
Posts: 91

Re: When sprite clicked as a boolean block

I support. I know there is an easy other way, still I always missed a block like that.
And isn't it right that you can just definde stack-blocks with the new 2.0-function? thought I read it somewhere...

Offline

 

#8 2012-09-05 15:34:24

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: When sprite clicked as a boolean block

It won't support another block with booleans and reporters in them? It wouldn't support the full

wait until <<mouse down?> and <touching [mouse v]?>>
I tried it in the beta, or alpha, whichever, and it seemed to work.


Why are the secret organizations getting all the attention?  mad

Offline

 

#9 2012-09-05 17:49:46

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: When sprite clicked as a boolean block

The Scratch Team hardly ever accepts suggestions with easy workarounds.


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

#10 2012-09-06 20:06:04

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: When sprite clicked as a boolean block

scimonster wrote:

Something that simple doesn't need a new block.  hmm


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

#11 2012-09-06 22:29:23

OverPowered
Scratcher
Registered: 2012-07-27
Posts: 100+

Re: When sprite clicked as a boolean block

But the workaround isn't perfect... If the mouse is down and passes over the sprite, ie while dragging something, then this would trigger...
I know that there's another workaround...

when gf clicked
forever if <(clicked?) = [yes]>
set [clicked v] to [no]
do stuff
when ClickMe clicked
set [clicked v] to [yes]
end script
... but this boolean block would allow for easier (and one-script) perfect "click" sensing, which would be really nice for multipupose buttons.  smile


Newest project: Tunnel TEST ~http://blocks.scratchr.org/API.php?user=OverPowered&amp;action=onlineStatus~ On my mind: Unicameralism

Offline

 

#12 2012-09-07 03:13:05

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: When sprite clicked as a boolean block

That workaround isn't an exact workaround


Why

Offline

 

#13 2012-09-07 03:15:32

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: When sprite clicked as a boolean block

I guess none of the workarounds are perfect.


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#14 2012-09-07 04:45:15

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: When sprite clicked as a boolean block

And if the sprite is at the back and hidden, it still triggers.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#15 2012-09-07 06:59:51

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: When sprite clicked as a boolean block

Perfect workaround, but it'll only substitute for a wait until:

set [cl v] to [0]
repeat until <(cl) =  [1]>
 wait until <not <mouse down?>>
 wait until <mouse down?>
 if <touching [mouse-pointer v]?>
  set [cl v] to [1]
 end
end

Last edited by BirdByte (2012-09-07 07:00:19)


http://i50.tinypic.com/312u714.jpg

Offline

 

Board footer