Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sun 19/03/2006 13:18:20

Title: Mouseover descriptions (SOLVED)
Post by: on Sun 19/03/2006 13:18:20
Hi, I've been trawling these forums all day and found loads of posts on how to do the mouseover hotspots but I can't get it following the mouse. I've got my invisible @overhotspot@ GUI and the text is showing up in the top left when I mouse over. I've tried the code to attach it to the mouse:

SetGUIPosition(THENEWGUISNAME, mouse.x, mouse.y);

and get the following error:

Error (line 13): Undefined token 'SetGUIPosition'

I've been using AGS for 4 days and this means nothing to me  ???

I'm sure it's a simple oversight only a newbie could make. Any help would be appreciated.
Title: Re: Discworld-style, fixed mouseover descriptions
Post by: Ashen on Sun 19/03/2006 13:48:17
It's probabbly to do with the version of AGS you're using. If you've only had it for a few days, it's most likely 2.71 (check 'Help' -> 'About' to be sure), and the SetGUIPosition command has been replaced (this code relates to V2.62 and earlier).

Look up SetGUIPosition in the manual, and it should give you the command you need to use instead: GUI.SetPosition (http://www.adventuregamestudio.co.uk/manual/GUI.SetPosition.htm), e.g.:
gThenewguisname.SetPosition(mouse.x, mouse.y);
Title: Re: Discworld-style, fixed mouseover descriptions
Post by: on Sun 19/03/2006 14:31:56
Thanks Ashen, that's working perfect.

I'll have to get stuck into the scripting tutorials in the manual to get a better handle on this stuff.