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
Something that simple doesn't need a new block.
Offline
In 2.0, you can byob that does this. Just define it with that script.
Offline
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.
Offline
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
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.
Offline
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.
Offline
That workaround isn't an exact workaround
Offline
I guess none of the workarounds are perfect.
Offline
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)
Offline