Mouseover descriptions (SOLVED)

Started by , Sun 19/03/2006 13:18:20

Previous topic - Next topic

rossito

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.

Ashen

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, e.g.:
gThenewguisname.SetPosition(mouse.x, mouse.y);
I know what you're thinking ... Don't think that.

rossito

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.

SMF spam blocked by CleanTalk