Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 01/06/2004 15:57:35

Title: Mouse over hotspot or object question....
Post by: on Tue 01/06/2004 15:57:35
How is it possible in script language to define if mouse is over a hotspot or an object and which hotspot or object is this? Is it possible? I don't know if this message fits in this forum but I'm still a newbie. Any hint would be helpful. Thanks
Title: Re: Mouse over hotspot or object question....
Post by: Ashen on Tue 01/06/2004 16:05:13
GetObjectAt(mouse.x, mouse.y)
GetHotspotAt(mouse.x, mouse.y)
GetLocationType(mouse.x, mouse.y)

The manual has more details. Hope this helps.
Title: Re: Mouse over hotspot or object question....
Post by: Mr Jake on Tue 01/06/2004 17:30:18
if (GetObjectAt(mouse.x, mouse.y) > 0){
if (GetObjectAt(mouse.x, mouse.y) == 1){
Ã,  DO CODE FOR OBJECT 1
Ã,  }
else if (GetObjectAt(mouse.x, mouse.y) == 2){
DO CODE FOR OBJECT 2
Ã,  }
Ã,  (etc)
Ã,  }


do the same with hotspot but replace 'Object' with 'Hotspot' (duh : :) )