Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Pyroman on Thu 25/08/2011 08:03:23

Title: Reference Any Hotspot
Post by: Pyroman on Thu 25/08/2011 08:03:23
Hey guys,

I searched around the wiki and forums (as best I could through google), and I couldn't find anything obvious that answered my question.
Hopefully this isn't too technical for the beginners forum!

Basically, I want to reference every hotspot so I can increase a variable each time any hotspot is hit. The problem is I can't find a way to reference every hotspot in one go, and I wanted to know if there was a simple in-built way to do this before I started hacking away.
Title: Re: Reference Any Hotspot
Post by: Khris on Thu 25/08/2011 08:38:46
Here:

  Hotspot*h;

  int i = 1;
  while (i < AGS_MAX_HOTSPOTS) {

    h = hotspot[i];

    Display(h.Name);

    i++;
  }


hotspot[0] is the area outside the drawn hotspots.
Title: Re: Reference Any Hotspot
Post by: monkey0506 on Thu 25/08/2011 18:49:04
Hotspot 0 is a valid hotspot just like everything else, it's just treated as eLocationNothing by GetLocationType and Game.GetLocationName. Of course it's probably unlikely that you would want every single pixel of the screen to be covered by an interactable hotspot.. ::) But if there are event handlers linked to hotspot 0 then they will be properly called by ProcessClick.

..just sayin. :D