Mouse over object question.

Started by Qwentle, Fri 08/08/2008 22:40:07

Previous topic - Next topic

Qwentle

How would I be able to be able to see the name of a object or Hotspot when the mouse is over it ? ???

TwinMoon

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)

olafmoriarty

Forgive me for asking, but wouldn't it be easier to just use @OVERHOTSPOT@?

Qwentle

#3
For what exactly?

Thank you TwinMoon for solving my question. ;D

olafmoriarty

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)

Khris

Forum query for "mouse over hotspot":

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

SMF spam blocked by CleanTalk