Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Ender Hugo on Fri 19/01/2018 03:56:04

Title: How to change your mouse mode without using "Mouse.SelectNextMode"?
Post by: Ender Hugo on Fri 19/01/2018 03:56:04
I'm trying to make a little interface to change the cursor, I would like to know if it's possible to change to a specific cursor instead of only the next one.
(Because the "Mouse.SelectNextMode" wouldn't work for what I'm doing)
Title: Re: How to change your mouse mode without using "Mouse.SelectNextMode"?
Post by: Gilbert on Fri 19/01/2018 05:06:03
Look for mouse.Mode from the manual.
Title: Re: How to change your mouse mode without using "Mouse.SelectNextMode"?
Post by: Ender Hugo on Fri 19/01/2018 05:14:41
Yeah... in the manual there is nothing about how to change the cursor so...
Title: Re: How to change your mouse mode without using "Mouse.SelectNextMode"?
Post by: Gilbert on Fri 19/01/2018 06:05:05
Yes. There are. From the manual:
Quote
Mode property (mouse)
...
int Mouse.Mode;

Gets/sets the current mode of the mouse cursor. This is one of the cursor modes from your Cursors tab (but with eMode prepended). For example, a cursor mode called "Walk to" on your cursors tab would be eModeWalkto.
Setting this changes both the appearance of the cursor and the Cursor Mode used if the player clicks on a hotspot.
...

So what you do is simply something like:
Code (ags) Select
mouse.Mode = [script name of a mouse mode as shown in the editor];
Title: Re: How to change your mouse mode without using "Mouse.SelectNextMode"?
Post by: Ender Hugo on Fri 19/01/2018 06:22:33
Thanks dude, helped me a lot.
(I was dumb, I know)