need some how to make mouse go infinatly

catinas

  • Posts: 54
need custom behavior

set X/Y of mouse to [custom]

i want to be able to change position of mouse without moving mouse it self could you help me

added file so you can help me found a solution

camera_x 
controls:

move mouse on x axis
and pres left mouse button to go forward

« Last Edit: March 22, 2019, 11:37:36 am by catinas »

merrak

  • *
  • Posts: 2738
I don't think you can take complete control over of the mouse from the operating system like that.

You can hide the mouse cursor, though. So one approach you could take would be to hide the real mouse cursor, then set up an actor that follows the mouse x/y. When you want to take over control of the "mouse", change the position of the actor and disable the x/y tracking until you're ready for the player to have control over it again. Just note that the player can get their mouse back by moving it outside of the game's window.

catinas

  • Posts: 54
thanks... but i need it to make like a in 3d games where mouse can be moved to one side for infinit time

what hapens now is when u reach a border x stops changing

JeffreyDriver

  • Posts: 2262
Mouse locking? Not sure how to do that in Stencyl. Maybe there's a haxe solution.

Luyren

  • *
  • Posts: 2775
thanks... but i need it to make like a in 3d games where mouse can be moved to one side for infinit time

what hapens now is when u reach a border x stops changing
Then you can just do what merrak mentioned, and perform your logic to "keep moving" or whatever you want while the actor is at the screen's borders (you can use a number attribute instead of directly the mouse coordinates for that).
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

catinas

  • Posts: 54
please help me i created a game to show the problem

mouse leaves/ no more turns actor wiew to side

please test it and help me find solution

catinas

  • Posts: 54
so there is no way?... maybe its possible to do a extension that lets change mouse position

JeffreyDriver

  • Posts: 2262
Mouse locking/pointer locking should be possible, but you'll need some custom code.