Discuss Scratch

The4thPixel
Scratcher
1000+ posts

Detection for right mouse or left mouse button

theAnimalR wrote:

You can detect right mouse clicking…

define //when stage clicked event
define
if <mouse down?> then


set [buttonPressed v] to [left]

else
set [buttonPressed v] to [right]
end


when green flag clicked
forever
if <<(buttonPressed) = [right]> and <touching [what needs to be right clicked v] ?>> then
broadcast [right click on (what needs be right clicked) v]
end
end
Welcome to the forums! Please don't bump old topics.
Digital_Gaming
Scratcher
1000+ posts

Detection for right mouse or left mouse button

Support.
The4thPixel
Scratcher
1000+ posts

Detection for right mouse or left mouse button

Digital_Gaming wrote:

Support.
Hello

I've noticed a lot of times now you've supported or no supported a suggestion without adding any thoughts to the discussion. Please consider elaborating. If you need help, Sigton has a helpful topic here that explains.
Digital_Gaming
Scratcher
1000+ posts

Detection for right mouse or left mouse button

Bump.
Cub56
Scratcher
1000+ posts

Detection for right mouse or left mouse button

bump
laguy
Scratcher
100+ posts

Detection for right mouse or left mouse button

support
if <(Khan Academy is awesome) = [true]> {  
go to [ khanacademy.org]
}
khan academy
jordan1060
Scratcher
500+ posts

Detection for right mouse or left mouse button

MushroomMan99 wrote:

Haiming wrote:

Good suggestion!
But why would we need a right mouse option…
I'm indifferent
I need it for the Minecraft game I am making. Using space for placing blocks confuses people so I would rather use right-click.
I think in griffpatch's minecraft it has that
Sprinternet
Scratcher
69 posts

Detection for right mouse or left mouse button

Support
if <right mouse button down?:: sensing> then

end
Tristan-Nate
Scratcher
1 post

Detection for right mouse or left mouse button

gigapouch wrote:

Instead of the plain
<mouse down?>

block, there should be a dropdown like this:

<[right v] mouse down?>
<[left v] mouse down?>

Supporter Count:
9

Non-Supporter Count:
2
i agree
gdfsgdfsgdfg
Scratcher
1000+ posts

Detection for right mouse or left mouse button

Tristan-Nate wrote:

gigapouch wrote:

Instead of the plain
<mouse down?>

block, there should be a dropdown like this:

<[right v] mouse down?>
<[left v] mouse down?>

Supporter Count:
9

Non-Supporter Count:
2
i agree
Congrats you revived an old post

Last edited by gdfsgdfsgdfg (May 23, 2023 15:21:52)

sereinee
Scratcher
22 posts

Detection for right mouse or left mouse button

Support!
gdfsgdfsgdfg
Scratcher
1000+ posts

Detection for right mouse or left mouse button

sereinee wrote:

Support!

Why do you support? be constructive
BigNate469
Scratcher
1000+ posts

Detection for right mouse or left mouse button

Bump because duplicate.


Anyways, the default option should always be the left mouse button one, because it's less confusing for people on tablets if it actually works at first.

All the current
<mouse down?>
blocks can simply be converted to
<[left v] mouse down? :: sensing>

There should also be a note somewhere, such as the FAQ page, stating that this assumes that you have not flipped the left and right mouse buttons. This isn't usually an issue these days- it's handled either by your OS or browser, but still.

Last edited by BigNate469 (Sept. 13, 2024 19:16:46)

A-MARIO-PLAYER
Scratcher
1000+ posts

Detection for right mouse or left mouse button

████████
████
████
█████
████████

This can help with making context menus or maybe as an extra attack in a fighting project.

In addition we should add these hat blocks.
when this sprite [left clicked v] :: events hat cat

when this sprite [right clicked v] :: events hat cat

Last edited by A-MARIO-PLAYER (Sept. 13, 2024 19:36:23)

meowgon
Scratcher
82 posts

Detection for right mouse or left mouse button

There was something like That was rejected already ( https://scratch.mit.edu/discuss/topic/779656/ )

Last edited by meowgon (Sept. 14, 2024 06:50:15)

chriscreators14
Scratcher
500+ posts

Detection for right mouse or left mouse button

meowgon wrote:

(#55)
There was something like That was rejected already ( https://scratch.mit.edu/discuss/topic/779656/ )

It's not rejected, it's a duplicate topic. That's why it was closed.

Powered by DjangoBB