Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Candle on Mon 07/02/2005 02:13:13

Title: Mouse moves over hotspot/object? [SOLVED]
Post by: Candle on Mon 07/02/2005 02:13:13
Is there a  "Mouse moves over object"?
I want to change the mouse to look when it is  over an  object .

// script for hotspot1: Mouse moves over hotspot

SaveCursorForLocationChange();
SetMouseCursor(10);
Title: Re: Mouse moves over hotspot /object?
Post by: Goot on Mon 07/02/2005 04:49:59
You have to do:
if(GetObjectAt(mouse.x,mouse.y)==x){ //where x is the object
                                                                     //number
script here
}
in repeatedly execute (repeatedly execute always if you want)
Title: Re: Mouse moves over hotspot /object?
Post by: Candle on Mon 07/02/2005 04:56:42
Thanks Goot , That would go in the main room script right .
Cool I'll give it a try .

if(GetObjectAt(mouse.x,mouse.y)==0){ //where x is the object
                                                                     //number
SaveCursorForLocationChange();
SetCursorMode(MODE_LOOK);

}


Works great  thanks .
Title: Re: Mouse moves over hotspot/object? [SOLVED]
Post by: TerranRich on Tue 08/02/2005 03:05:02
I have a simple, unrelated question. Why do you always put your spaces before your punctuation? Never seen that before. ;) :P
Title: Re: Mouse moves over hotspot/object? [SOLVED]
Post by: Candle on Tue 08/02/2005 03:07:51
I have a twict (sp) sometimes my thumb will hit it and I don't even see it .
You should see the mouse sometimes move all over when my hand starts moving on its own . lol
Title: Re: Mouse moves over hotspot/object? [SOLVED]
Post by: TerranRich on Tue 08/02/2005 03:10:49
Hah, my mouse does that, not because I twitch, but because it's an optical mouse being used on a fine, light-colored wooden grain desk. It always seems to jump to a random corner of the screen. :P
Title: Re: Mouse moves over hotspot/object? [SOLVED]
Post by: Candle on Tue 08/02/2005 03:13:05
I have an optical mouse too. I use a  small cutting board I got at walmart for  my mousepad .:)
Works great that way .