Discuss Scratch

PizzaAddict4Life
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

As said later, this is really just allowing a way for a complex mouse-locking system. There is probably already a suggestion on that, so I am closing this topic.

Please note: This is NOT rejected! (Or at least of time of creation). HIDING a mouse pointer is rejected, not moving it!

Suggestion

My suggestion is that we add this block:

set mouse position to x: () y: () :: motion

I had this idea because of this topic (you don't need to read it, only if you are curious)

Functionality

It could be useful for “infinite scrolling games” in which you want to move your mouse to the far left of the stage, and then it goes to the right, such as it is in minecraft or other games.

If the values were a number in which the mouse pointer would go off the stage, it would only go to the edge of the stage.

Preventing Against Misuse/big]

Someone might do

forever
set mouse position to x: () y: () :: motion
end

which would make the mouse go to a certain position, right?
Well, first you can just close the project (ctrl+w) or you can press escape. Once you press escape, the project no longer has control of your mouse.

Pros:

Infinite scrolling (for 3d engines and whatnot)
A speed game (once you touch something your mouse goes back in the middle and then you have to touch it again)
Movement (Maybe where there are rooms, if you touch the edge of the screen it goes to the next room, and then it moves your cursor back so it doesn't do that a ton)

Cons:

Currently can't think of any.

Please read the “Preventing against misuse” section before you say you can't exit out ot the project

Last edited by PizzaAddict4Life (July 3, 2020 00:46:33)

TImeAndAgain
Scratcher
83 posts

Move mouse pointer / set mouse pointer

this would be useful, but there should be a pop up that you can press esc to release the mouse or people might disable use of ones computer especially if the user had no idea how to force quit

nevermind. this is a cool idea, I cant see myself using it, but im sure many others would!

Support!

Last edited by TImeAndAgain (June 17, 2020 20:41:40)

Wyan100
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

Workaround:

Make a sprite labeled “Mouse”, this sprite will go to the Mouse Pointer unless you interfere with it.
BearSlothCoding
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

Wyan100 wrote:

Workaround:

Make a sprite labeled “Mouse”, this sprite will go to the Mouse Pointer unless you interfere with it.
They are suggesting to move the mouse, not make the mouse a sprite.
As for the suggestion, semi-support. It's a good idea because it would be very useful. But replacing the mouse was rejected because it doesn't really change the types of projects made with Scratch and it could confuse users, I feel like the same could happen here.

Last edited by BearSlothCoding (June 17, 2020 21:46:44)

PizzaAddict4Life
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

Wyan100 wrote:

Workaround:

Make a sprite labeled “Mouse”, this sprite will go to the Mouse Pointer unless you interfere with it.

That still doesn't work, if it goes to the edge of the screen and then the mouse pointer doesn't, it will repeatedly teleport somewhere else and to the mouse if you are using a different script.

fdreerf
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

For your example of a scrolling camera, you could just do
if <(mouse x) > [-239]> then 
left edge
else
if <(mouse x) < [239]> then
right edge
end
end
PizzaAddict4Life
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

fdreerf wrote:

For your example of a scrolling camera, you could just do
if <(mouse x) > [-239]> then 
left edge
else
if <(mouse x) < [239]> then
right edge
end
end

That is a good script, but it still has the problem of the fact that once the mouse leaves the stage… the mouse leaves the stage and is no longer in much control
fdreerf
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

PizzaAddict4Life wrote:

fdreerf wrote:

For your example of a scrolling camera, you could just do
-snip-
That is a good script, but it still has the problem of the fact that once the mouse leaves the stage… the mouse leaves the stage and is no longer in much control
If the cursor is outside the stage, it reports “-240” for the x on the left edge and “240” for the right, no matter how far.

Last edited by fdreerf (June 17, 2020 22:02:17)

ioton
Scratcher
500+ posts

Move mouse pointer / set mouse pointer

I wouldn't think this is a great idea, the “infinite scrolling” idea.
You could just (a terrible example lol) and make it come in.
——– ——————-
thing1|thing2 |
——– ——————-
Plus, not everyone knows how to “prevent misuse”.
PizzaAddict4Life
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

fdreerf wrote:

PizzaAddict4Life wrote:

fdreerf wrote:

For your example of a scrolling camera, you could just do
-snip-
That is a good script, but it still has the problem of the fact that once the mouse leaves the stage… the mouse leaves the stage and is no longer in much control
If the cursor is outside the stage, it reports “-240” for the x on the left edge and “240” for the right, no matter how far.

Yeah, so not much control.
mlcreater
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

As far as I know, there is no way for the ST to make this work.

No website can move your mouse-pointer. Only you can move your mouse-pointer.
fdreerf
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

PizzaAddict4Life wrote:

fdreerf wrote:

PizzaAddict4Life wrote:

fdreerf wrote:

For your example of a scrolling camera, you could just do
-snip-
That is a good script, but it still has the problem of the fact that once the mouse leaves the stage… the mouse leaves the stage and is no longer in much control
If the cursor is outside the stage, it reports “-240” for the x on the left edge and “240” for the right, no matter how far.

Yeah, so not much control.
This suggestion will make the cursor stay in one place, so it's the same amount of control.
What are you saying?
k0stya
Scratcher
50 posts

Move mouse pointer / set mouse pointer

Hello so I do support this! I am making Minecraft 3D and I am the one who brought this up, but the main problem is that we CAN’T do it like that. Since the problem is that then people will make others force things and second there’d be no way to exit a project. What we need is a infinite mouse movement. To make a like set mouse movement type to (type). the types can be (Infinite, project, whole browser, whole screen.) I’d love to see that.
PizzaAddict4Life
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

k0stya wrote:

Hello so I do support this! I am making Minecraft 3D and I am the one who brought this up, but the main problem is that we CAN’T do it like that. Since the problem is that then people will make others force things and second there’d be no way to exit a project. What we need is a infinite mouse movement. To make a like set mouse movement type to (type). the types can be (Infinite, project, whole browser, whole screen.) I’d love to see that.

I did specifically say that if you press ESC then it won't do anything to your mouse anymore
k0stya
Scratcher
50 posts

Move mouse pointer / set mouse pointer

PizzaAddict4Life wrote:

k0stya wrote:

Hello so I do support this! I am making Minecraft 3D and I am the one who brought this up, but the main problem is that we CAN’T do it like that. Since the problem is that then people will make others force things and second there’d be no way to exit a project. What we need is a infinite mouse movement. To make a like set mouse movement type to (type). the types can be (Infinite, project, whole browser, whole screen.) I’d love to see that.

I did specifically say that if you press ESC then it won't do anything to your mouse anymore
Oh ok thanks! I also made a suggestion slightly different it’s probably better. It’s called mouse modes or something like that in the suggestions in.forums.
mlcreater
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

PizzaAddict4Life wrote:

k0stya wrote:

Hello so I do support this! I am making Minecraft 3D and I am the one who brought this up, but the main problem is that we CAN’T do it like that. Since the problem is that then people will make others force things and second there’d be no way to exit a project. What we need is a infinite mouse movement. To make a like set mouse movement type to (type). the types can be (Infinite, project, whole browser, whole screen.) I’d love to see that.

I did specifically say that if you press ESC then it won't do anything to your mouse anymore
What if you accidentally press ESC? Will you then have to reload the browser tab?

How about viewers using mobile devices without ESC keys?
fdreerf
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

mlcreater wrote:

What if you accidentally press ESC? Will you then have to reload the browser tab?

How about viewers using mobile devices without ESC keys?
How would this even work on mobile in the first place?
k0stya
Scratcher
50 posts

Move mouse pointer / set mouse pointer

fdreerf wrote:

mlcreater wrote:

What if you accidentally press ESC? Will you then have to reload the browser tab?

How about viewers using mobile devices without ESC keys?
How would this even work on mobile in the first place?
It would work like mcpe, I have made mcpe on scratch but not like pc.
PizzaAddict4Life
Scratcher
1000+ posts

Move mouse pointer / set mouse pointer

mlcreater wrote:

PizzaAddict4Life wrote:

k0stya wrote:

Hello so I do support this! I am making Minecraft 3D and I am the one who brought this up, but the main problem is that we CAN’T do it like that. Since the problem is that then people will make others force things and second there’d be no way to exit a project. What we need is a infinite mouse movement. To make a like set mouse movement type to (type). the types can be (Infinite, project, whole browser, whole screen.) I’d love to see that.

I did specifically say that if you press ESC then it won't do anything to your mouse anymore
What if you accidentally press ESC? Will you then have to reload the browser tab?

How about viewers using mobile devices without ESC keys?

No, pressing ESC simply would do nothing except denies access to move your pointer. Ctrl+w a shortcut would close the tab

Last edited by PizzaAddict4Life (June 18, 2020 03:51:59)

scratch978654
Scratcher
100+ posts

Move mouse pointer / set mouse pointer

PizzaAddict4Life wrote:

Please note: This is NOT rejected! (Or at least of time of creation). HIDING a mouse pointer is rejected, not moving it!

Suggestion

My suggestion is that we add this block:

set mouse position to x: () y: () :: motion

I had this idea because of this topic (you don't need to read it, only if you are curious)

Functionality

It could be useful for “infinite scrolling games” in which you want to move your mouse to the far left of the stage, and then it goes to the right, such as it is in minecraft or other games.

If the values were a number in which the mouse pointer would go off the stage, it would only go to the edge of the stage.

Preventing Against Misuse

Someone might do

forever
set mouse position to x: () y: () :: motion
end

which would make the mouse go to a certain position, right?
Well, first you can just close the project (ctrl+w) or you can press escape. Once you press escape, the project no longer has control of your mouse.

Pros:

Infinite scrolling (for 3d engines and whatnot)
A speed game (once you touch something your mouse goes back in the middle and then you have to touch it again)
Movement (Maybe where there are rooms, if you touch the edge of the screen it goes to the next room, and then it moves your cursor back so it doesn't do that a ton)

Cons:

Currently can't think of any.
No support. This makes the mouse move to places you don't want to how do you end the project if the mouse is constantly moving?

Powered by DjangoBB