Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - markbilly

#681
I want the name of a hotspot or object to appear when the mouse hovers over it.

Currently I am focusing on the hotspot...

At the moment, I have used a GUI (gMouselabel) with a label in it (label text: @OVERHOTSPOT@)

and in "repeatedly execute" part of global script I have:

Code: ags
function repeatedly_execute() {
 
 		if (gMouselabel.Visible == true) {
			UnPauseGame ();											
	}

 gMouselabel.SetPosition(mouse.x, mouse.y);

}


This should display the gui (following the mouse) all the time, however the game should not be paused. It should also display the name of the hotspot the mouse hovers over, in the gui.

When tested, the GUI does appear and follow the mouse, however the game appears to be paused and the hotspot name does not appear.

What am I doing wrong, or is there a better way to achieve this?

I have read all the possible topics on this to no avail (in fact, that is where most of my current ideas have come from)

I know this is possible as a vast number of AGS games I have played do it.



Thankyou.
SMF spam blocked by CleanTalk