Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: BorisZ on Fri 08/10/2004 18:01:58

Title: @OVERHOTSPOT@ not working
Post by: BorisZ on Fri 08/10/2004 18:01:58
I have blank GUI with label wich text property is set to "@OVERHOTSPOT@". It is moving with mouse cursor. As I understood in manual,  it should show name property of hotspots on stage while cursor is over them. But it doesn't.

I can do it other way: set on mouse over with every hotspot and change label text, but there is number of hotspots and much more work.

(using 2.61 on XP)

What?
Title: Re: @OVERHOTSPOT@ not working
Post by: SSH on Fri 08/10/2004 18:37:41
by "name property of hotspots" do you mean a user-defined property that you have set up with the property schema editor, or simply the hotspot name that you fill in on the room editor areas page? Becuase overhotspot only works with the latter.

However, you can put in your global repeatedly_execute function:


string my_buffer;
GetLocationName(mouse.x, mouse.y, my_buffer);
SetLabelText(GUI, LABEL, my_buffer);
Title: Re: @OVERHOTSPOT@ not working
Post by: BorisZ on Fri 08/10/2004 18:43:42
Quote from: SSH on Fri 08/10/2004 18:37:41
by "name property of hotspots" do you mean a user-defined property that you have set up with the property schema editor, or simply the hotspot name that you fill in on the room editor areas page?

I mean hotspot name in room editor. So, it should work?
Thanks for reply, I will use your script, but I am still puzzled why @overhotspot@ doesn't work!
Title: Re: @OVERHOTSPOT@ not working
Post by: Mr Jake on Fri 08/10/2004 19:35:21
I bet you have the GUI so the mouse is on top of it, ie GUI at mouse.x mouse.y. Make it a few pixels away so the mouse is over the hotspots, not on the GUI
Title: Re: @OVERHOTSPOT@ not working
Post by: strazer on Fri 08/10/2004 19:37:26
Yeah, or uncheck the GUI's "Clickable" checkbox.
Title: Re: @OVERHOTSPOT@ not working
Post by: BorisZ on Fri 08/10/2004 19:39:53
Quote from: Hotspot on Fri 08/10/2004 19:35:21
I bet you have the GUI so the mouse is on top of it, ie GUI at mouse.x mouse.y. Make it a few pixels away so the mouse is over the hotspots, not on the GUI

No, it isn't. It is distant enough.

I gues I need some more of that @OVERYOU@ helpÃ,  ;)



Quote from: strazer on Fri 08/10/2004 19:37:26
Yeah, or uncheck the GUI's "Clickable" checkbox.

Nope,Ã,  didn't do the trick.


I guess I have to use hotspot actions. Strange, but I just can't get @OVERHOTSPOT@ working.
Title: Re: @OVERHOTSPOT@ not working
Post by: Ishmael on Sat 09/10/2004 06:19:36
I tried with an earlier version of AGS, and the @OVERHOTSPOT@ trick with a mouse following GUI does not work. I couldn't get any way of retrieving the hotspot name (filled in room editor) to work with a GUI that moves around following the mouse.

Have there been something done in a later version after 2.56d about this issue?
Title: Re: @OVERHOTSPOT@ not working
Post by: Mr Jake on Sat 09/10/2004 09:01:54
Ive done it before, it does work.

what mode is the GUI set to?
Title: Re: @OVERHOTSPOT@ not working
Post by: SSH on Sat 09/10/2004 14:37:06
Boris, can you post the whole of your script that you are using for making the GUI follow the mouse? Ar you sure that the blank GUi is actually following the mouse?
Title: Re: @OVERHOTSPOT@ not working
Post by: BorisZ on Sat 09/10/2004 18:55:32
Quote from: SSH on Sat 09/10/2004 14:37:06
Boris, can you post the whole of your script that you are using for making the GUI follow the mouse? Ar you sure that the blank GUi is actually following the mouse?


Yes, I am very sure. As I mentioned earlier, I can make it work by setting mouseover actions on hotspots and by:

string my_buffer;

GetLocationName(mouse.x, mouse.y, my_buffer);
SetLabelText(GUI, LABEL, my_buffer);

so, I don't really need that @OVERHOTSPOT@ any more. Anyway, here is my script (on repedately execute,  off course):

  if (mouse.y<280)
       SetGUIPosition(1,mouse.x-75,mouse.y+10);
       else
       SetGUIPosition(1,mouse.x-75,mouse.y-25);

(This if ...else thing is to avoid error when GUI is out of range).

You don't really need to bother as far as I am concerned (though it would be nice to know what's going on).