Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Tha2ohSIX on Fri 03/10/2003 23:40:48

Title: Changing cursor
Post by: Tha2ohSIX on Fri 03/10/2003 23:40:48
Hi everybody, after changing the mouse cursor when it moves over a hotspot, is there a way to switch it back to the cursor it was previously on when it leaves the hotspot?  Thanks for any help.
Title: Re:Changing cursor
Post by: Quintaros on Sat 04/10/2003 01:47:14
Hey I'm just working on this myself.  You can create an interaction for the non-hotspot that changes the cursor back.

ie:

if (gethotspotat(mouse.x, mouse.y)==0){
SetDefaultCursor();
}
Title: Re:Changing cursor
Post by: Pumaman on Sat 04/10/2003 13:35:30
An easier method to do this is on my to-do list, but for now yes an approach like Quintaros suggests should work fine.
Title: Re:Changing cursor
Post by: Tha2ohSIX on Sun 05/10/2003 11:15:46
I've been working on this for an hour and can't seem to figure it out.  I don't know what coordinates to put in place of mouse.x and mouse.y and where to put this in the script.  I just set mouse.x and mouse.y to 1, and 1, and I then tried putting it in the hotspot's script after where I set the mouse cursor to 9, and I tried it next in the room's "repeatedly execute".  Please help, this will be a major stepping stone in my game.  Thanks.
Title: Re:Changing cursor
Post by: Tha2ohSIX on Mon 06/10/2003 13:43:09
Sorry, I didn't know that editing my post wouldn't bump it to the top of the forum.  I was worried no one would notice this.
Title: Re:Changing cursor
Post by: Pumaman on Mon 06/10/2003 22:03:41
Put it in repeatedly_Execute, exactly as it is:

if (GetHotspotAt(mouse.x, mouse.y)==0){
SetDefaultCursor();
}

Do not replace the mouse variables, they contain the cursor's current position
Title: Re:Changing cursor
Post by: Tha2ohSIX on Tue 07/10/2003 08:40:19
OMG, I can't believe I didn't figure that out, lol.  I kept reading the "gethotspotat" thing in the manual over and over wondering what I was doing wrong.  THANK YOU!!!!!!!