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

#1 2011-09-12 14:21:41

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Clicking stuff!

Hi guys, I am having some trouble with clicking stuff. In my game, you have an option of clicking two different buttons. I clicked one and then they both hid, and then I waited like .1 second and clicked the x position and y position of the other button that was hidden, and it still did the corresponding script! Will this glitch occur online too? If so, please tell me a way to get rid of this bug.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#2 2011-09-12 15:43:21

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Clicking stuff!

If you have the script "When [Sprite] Clicked>Hide" Then it will not respond, what you could do is set the ghost effect to 100% then it will respond when clicked even though the user can't see it. You could also detect if the user clicks inside an area an area you define:

Code:

<if mouse down> and <mouse x > 0> and <mouse x < 50> and <mouse y > 0> and <mouse y < 50>

If you do something like that, it will check if the mouse is down and in the area "0 by 50 by 0 by 50".

Last edited by Magnie (2011-09-12 15:43:48)

Offline

 

#3 2011-09-12 17:51:12

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Clicking stuff!

Magnie wrote:

If you have the script "When [Sprite] Clicked>Hide" Then it will not respond, what you could do is set the ghost effect to 100% then it will respond when clicked even though the user can't see it. You could also detect if the user clicks inside an area an area you define:

Code:

<if mouse down> and <mouse x > 0> and <mouse x < 50> and <mouse y > 0> and <mouse y < 50>

If you do something like that, it will check if the mouse is down and in the area "0 by 50 by 0 by 50".

I am using when I receive some thing wait 1 second show wait until touching mouse pointer and mouse down for both buttons.

Last edited by Thescratch3 (2011-09-12 17:51:20)


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#4 2011-09-12 17:57:15

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Clicking stuff!

Magnie wrote:

If you have the script "When [Sprite] Clicked>Hide" Then it will not respond, what you could do is set the ghost effect to 100% then it will respond when clicked even though the user can't see it. You could also detect if the user clicks inside an area an area you define:

Code:

<if mouse down> and <mouse x > 0> and <mouse x < 50> and <mouse y > 0> and <mouse y < 50>

If you do something like that, it will check if the mouse is down and in the area "0 by 50 by 0 by 50".

And I think I will just use a variable. Thanks for replying though.

Last edited by Thescratch3 (2011-09-12 17:57:24)


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#5 2011-09-12 21:48:30

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Clicking stuff!

Mods please close this topic.

Last edited by Thescratch3 (2011-09-12 21:49:49)


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#6 2011-09-12 21:55:17

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Clicking stuff!

Thescratch3 wrote:

Mods please close this topic.

Done.  smile

In the future, just report the first post and ask for it to be closed. That way, a mod is sure to see it.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer