Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Huw Dawson

#341
Could you elaborate? What is *exactly* the problem?
#342
So, In total:

Code: ags

  int newguix, newguiy; // declare variables that will hold the GUI's new position

  int overwhat = GetLocationType(mouse.x, mouse.y); // get what the mouse cursor is over

  if (overwhat == 1) { // if mouse is over a hotspot
    // get this hotspot's gui position values from its properties:
    newguix = GetHotspotProperty(GetHotspotAt(mouse.x, mouse.y), "descx");
    newguiy = GetHotspotProperty(GetHotspotAt(mouse.x, mouse.y), "descy");
  }
  else if (overwhat == 2) { // if mouse is over a character
    int charid = GetCharacterAt(mouse.x, mouse.y);
    newguix = character[charid].x + (GetCharacterProperty(GetCharacterAt(mouse.x, mouse.y), "descx"));
    newguiy = character[charid].y + (GetCharacterProperty(GetCharacterAt(mouse.x, mouse.y), "descy"));
  }
  else if (overwhat == 3) { // if mouse is over an object
    int objid = GetObjectAt(mouse.x, mouse.y);
    newguix = GetObjectX(objid) + (GetObjectProperty(objid, "descx"));
    newguiy = GetObjectY(objid) + (GetObjectProperty(objid, "descy"));
  }

  SetGUIPosition(THEGUINAME, newguix, newguiy);
#343
How do I get it to display OVER the hotspot rather than at the top-left of the screen?

EDIT:

I've done it. Just modify the two numbers on the box after you click off the "properties box, right? Thanks a million.  ;D
#344
That's not really what I asked for. I want to have the text at a specific place on the hot spot when I roll over it, not moving with the mouse.

And I did search. I found nothing so I posted.  :)
#345
Ok. My personal two favorite adventure games are Discworld 1 and 2. In them, when you rolled over a thing you could look at or interact with (even a person or item) it would display a piece of text over the object (like if I were looking at a house, rolling the mouse over the house would make the words "house" appear in the middle of the house hotspot)

I want to emulate this. How?  ???
SMF spam blocked by CleanTalk