SOLVED: Mouse: stop moving if y co ords =

Started by Slasher, Sun 06/10/2013 11:15:24

Previous topic - Next topic

Slasher

Hi

Would you help with a solution to this:

I am trying to stop the mouse moving y as the below image shows.

afaik you can't use StopMoving() with mouse.

The player moves to mouse y only.

Not sure if I should be using mouse.SetBounds or not and even so I would need a small hand setting it.



Cheers


Andail

Have you even tried mouse.SetBounds? It should be exactly what you're looking for.

Slasher

#2
Hi Andail,

QuoteHave you even tried mouse.SetBounds? It should be exactly what you're looking for.
Yes, I have tried and I think I just need to set it right.

cheers

EDIT

this seems to do the trick:

Code: ags

mouse.SetBounds(0, 124, 640, 366);




Khris

According to your image, shouldn't it be
Code: ags
  mouse.SetBounds(0, 110, 640, 376);
?

Slasher

Hi Khris,

decide to make small changes co ord because it suited the room better (nod)

Ryan Timothy B

Just make sure you disable the cursor boundary if someone presses ESC, which should make the menu appear. Then have the bounds enable when they return to game. Otherwise those playing in window mode can't easily escape the cursor - and it's VERY frustrating.

Slasher

Hi Ryan,

you can press Esc to skip intro (Cutscene) and go straight into the Game at the start.

The Esc does not bring up any menu.

How would I add what you suggest afterwards?

cheers



SMF spam blocked by CleanTalk