Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Sun 06/10/2013 11:15:24

Title: SOLVED: Mouse: stop moving if y co ords =
Post by: Slasher on Sun 06/10/2013 11:15:24
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.

(http://i1181.photobucket.com/albums/x423/qikfire/AGSMouseArea_zpsdb010adf.png)

Cheers

Title: Re: Mouse: stop moving if y co ords =
Post by: Andail on Sun 06/10/2013 11:43:44
Have you even tried mouse.SetBounds? It should be exactly what you're looking for.
Title: Re: Mouse: stop moving if y co ords =
Post by: Slasher on Sun 06/10/2013 11:55:19
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) Select

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



Title: Re: SOLVED: Mouse: stop moving if y co ords =
Post by: Khris on Sun 06/10/2013 13:00:19
According to your image, shouldn't it be
Code (ags) Select
  mouse.SetBounds(0, 110, 640, 376);?
Title: Re: SOLVED: Mouse: stop moving if y co ords =
Post by: Slasher on Sun 06/10/2013 15:11:54
Hi Khris,

decide to make small changes co ord because it suited the room better (nod)
Title: Re: SOLVED: Mouse: stop moving if y co ords =
Post by: Ryan Timothy B on Mon 07/10/2013 02:15:20
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.
Title: Re: SOLVED: Mouse: stop moving if y co ords =
Post by: Slasher on Mon 07/10/2013 06:49:04
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