Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Qwentle on Fri 08/08/2008 22:40:07

Title: Mouse over object question.
Post by: Qwentle on Fri 08/08/2008 22:40:07
How would I be able to be able to see the name of a object or Hotspot when the mouse is over it ? ???
Title: Re: Mouse over object question.
Post by: TwinMoon on Fri 08/08/2008 22:49:22
Put a label on a gui, give it a Name (for instance lblStatus) and in your repeatedly_execute (in the global script) put the line:

lblStatus.Text = Game.GetLocationName(mouse.x, mouse.y);


(check out the GetLocationName entry in the help file for more info)
Title: Re: Mouse over object question.
Post by: olafmoriarty on Fri 08/08/2008 23:49:32
Forgive me for asking, but wouldn't it be easier to just use @OVERHOTSPOT@?
Title: Re: Mouse over object question.[Solved]
Post by: Qwentle on Fri 08/08/2008 23:55:29
For what exactly?

Thank you TwinMoon for solving my question. ;D
Title: Re: Mouse over object question.[Solved]
Post by: olafmoriarty on Sat 09/08/2008 01:06:42
Quote from: Qwentle on Fri 08/08/2008 23:55:29
For what exactly?

There are several ways of solving this problem, and though I have no doubt TwinMoon's ways works excellently, I'll just mention the other one because I personally find that one to be easier:

If you write the text "@OVERHOTSPOT@" in a GUI label, it is automatically replaced by the name of the hotspot, object or character you're hovering over. (manual entry (http://www.adventuregamestudio.co.uk/manual/Interface%20text.htm))
Title: Re: Mouse over object question.
Post by: Khris on Sat 09/08/2008 09:21:33
Forum query for "mouse over hotspot":

Internal server error 666:
CPU exploded. (More than 400000000000000000 results found)