Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: cjhrules on Thu 31/08/2006 01:19:55

Title: Hotspot over character
Post by: cjhrules on Thu 31/08/2006 01:19:55
Hi!
Is there a way to get a hotspot to display its name when the hotspot is over a "solid" and  "clickable" NPC?

Title: Re: Hotspot over character
Post by: Candle on Thu 31/08/2006 02:25:45
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=26306.0 ?
Title: Re: Hotspot over character
Post by: cjhrules on Thu 31/08/2006 05:56:14
ok, installed it... how do I get it to do what I want... and how do I remove that yellow text that is displayed when I move the mouse over a character?

Title: Re: Hotspot over character
Post by: monkey0506 on Thu 31/08/2006 06:17:53
You can do it like this:

Title: Re: Hotspot over character
Post by: cjhrules on Thu 31/08/2006 06:21:05
ok, I just made an object this time.... but thx  ;)
Title: Re: Hotspot over character
Post by: monkey0506 on Thu 31/08/2006 06:28:00
Uhhhh....so it's fixed then?

Although I'm not really sure how you get an object to display the text..... ???
Title: Re: Hotspot over character
Post by: cjhrules on Thu 31/08/2006 06:42:52
As I said in the orig post I just wanted the hotspot to be clickable even when over an NPC  character....
Title: Re: Hotspot over character
Post by: monkey0506 on Thu 31/08/2006 08:04:59
Well...I'm not sure about the internal workings of the Description module, but, unless I've missed something, wouldn't Hotspot.GetAtScreenXY() return the correct hotspot even if there was a character in front of it?

Oh...but...the Description module would probably attempt to get the Character's information instead because it's on top and so it would assume...okay...

I don't know if something like this would work, but perhaps you could use:

// room rep_ex
cNpc.Clickable = (Hotspot.GetAtScreenXY(mouse.x, mouse.y) != hotspot[HOTSPOT_NUM]); // HOTSPOT_NUM is the number of the hotspot


But then you say you've already got it working...haven't you? Oh well. Maybe someone else will find this useful. ;)