Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Bijulinus on Wed 09/02/2011 21:38:10

Title: [SOLVED] Problem: some hotspots not working
Post by: Bijulinus on Wed 09/02/2011 21:38:10
Hello everybody,
I searched the forum for this problem but with no luck: I hope you can help me!
The game is 800x600, and uses a @OVERHOTSPOT@.. I don't know what other information may be useful.

In my new game at least THREE rooms have hotspot behaviour problems:

a) a hotspot (#3) over a door simply doesn't appear when mouses passes over it. Simply dead and never worked from the beginning.
b) there are a few rows of buttons, with 26 hotspots in total: first button, (hotspot #2) looks dead like case 'a'... but not only: see c
c) in a third room, there are a few hotspots: the game often act weird. After passing over a hotspot, its name remains for a while in @OVERHOTSPOT even if passing over another one: it seems lagging.

The behaviour descripted in 'c' happens in the same way in case 'b'.

I really hope you can help me: I fear this problem is wider than I found out. Thank you very much !!

Good night... or good day whetever :)
Title: Re: Problem: some hotspots not working
Post by: Bijulinus on Sat 12/02/2011 17:28:05
Up!
I can't believe nobody has a hint :(  ???
Title: Re: Problem: some hotspots not working
Post by: monkey0506 on Sat 12/02/2011 17:52:07
Are you ever changing the label text via the script?

Also I'd recommend checking things like Hotspot.Enabled and Object.Enabled. Check baselines too.
Title: Re: Problem: some hotspots not working
Post by: Bijulinus on Sat 12/02/2011 22:20:33
@monkey:
thank you for your answer.
No, it refreshes itself and nothing touches it.

I don't know what do you mean with baselines in hotspots...?

Something may be important: I changed the mouse cursors using only interact, look and pointer and I've messed a bit with mouse modes.
I believe this means something because importing a nonworking room in a new template game, it perfectly works!!
Title: Re: Problem: some hotspots not working
Post by: Khris on Sat 12/02/2011 22:32:26
You should check the hotspots of the mouse cursors.
It sounds like there's a pretty big distance between where you think the mouse is and where it actually is technically.
Title: Re: Problem: some hotspots not working
Post by: Bijulinus on Sat 12/02/2011 22:52:16
@khris Thank you, I already checked them and they are pretty normal like 0,0 or 4,4, always near the actual "pointer".
The problem, which I may have not explained is that sometimes the hotspots lags behind: if I move from hotspot to hotspot the first one remains for a while and only moving again to the second make it appear and work.

You talk about distance beetwen real and apparent position, but I can't imagine how can the coordinate system shift so fast.

However, my left click function do just this:

function on_mouse_click(MouseButton button)
{
  if (IsGamePaused() == 1)
  {
  }
  else   if (button == eMouseLeft) {
    ProcessClick(mouse.x,mouse.y, mouse.Mode);
   
  }
  else
  {     
   
  }
}
Title: Re: [SOLVED] Problem: some hotspots not working
Post by: Bijulinus on Sun 13/02/2011 19:17:02
OK I found out the problem!

It was quite stupid:
I had a trasparent rectangular GUI with "clickable=true", which contained the @OVERHOTSPOT@ label, and I forgot it had large size, so it intercepted my clicks.
Solution: clickable=false! Damn trasparent gui ;)

Thank you for help!