hotspots not active?

Started by eshiel, Thu 14/01/2016 02:27:10

Previous topic - Next topic

eshiel

i'm running into a couple of problems.

1) So originally, I had a handful of hotspots with Look interactions that worked fine. I tried to add some objects but ultimately decided I didn't need them as I'm not utilizing any inventory system, removed them from the room/script, and switched to putting them in as hotspots drawn into the background (since the only thing I need from them is the "look" function with displaying some flavor text). But now only a handful of them will work.  Specifically, the first 4 work fine, and all after that don't? I'm not sure if I'm hitting some hotspot limit there or not. Here's my code (don't mind my filler text):
Code: ags

function hStank_Look()
{
 Display ("this is text i cant believe im redoing this");
 gSaveGame.Visible = true;
}


function hBrochure_Look()
{
 Display ("hi");
}

function hNet_Look()
{
 Display("hi again");
}

function hDress_Look()
{
 Display ("boo");
}

function hTank_Look()
{
 Display("BIG TANK");
}


function hNotepad_Look()
{
 Display("stuff here");
}


function hPic_Look()
{
 Display ("pic");
 
 }

function hBooks_Look()
{
 Display("boo");
}


function hBox_Look()
{
 Display("nothing");

}

function hScepter_Look()
{
 Display("who knows");
}


I also have a code running to make the cursor switch automatically when hovering over hotspots in repeatedly_execute-
Code: ags

  int mm = mouse.Mode;
  int nm;  // new mode
  Hotspot*h;
  Object*o;
 int lt = GetLocationType(mouse.x, mouse.y); // what's under the cursor?
 
  if (mm != eModeUseinv) {
  if (lt == eLocationNothing) nm = eModeWalkto;
  if (lt == eLocationHotspot) {
        h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
        nm = h.GetProperty("def_curs");
    }
        if (lt == eLocationObject) {
        o = Object.GetAtScreenXY(mouse.x, mouse.y);
        nm = o.GetProperty("def_curs");
    }
     if (lt == eLocationCharacter) {
  nm = eModeTalkto;
  }


2) I'm using Sierra-style with background for dialogue, however I have one line that's set to lucasarts using speech.style=eSpeechLucasArts; - however, her talksprite keeps popping up in the middle of her text anyway. i didn't think talksprites displayed with lucasarts style, so maybe that's just a misunderstanding of the functionality on my part, but is there a way to temporarily disable her talk sprite?
(you can see why it's a little awkward: )
ha! nevermind, got it, sorry!
thanks,
-e



Snarky

For your first problem, the cause is almost certainly that you haven't linked them from the "Look" event in the hotspot properties. (In the "Room" tab, show hotspots, go to the property panel in the bottom right, select the hotspot you want from the dropdown, and switch to the event view with the thunderbolt button. Enter the function name into the appropriate event field.)

eshiel

Unless I'm misunderstanding you, I do have them linked there?

Here's hNotepad to show my hotspot properties (all of them are set up this way, including the ones that work):

Snarky

Hm, weird. Does the hover work over all the hotspots?

If it's like the hotspot doesn't exist at all, you should check the "enabled" value. You might also want to confirm that the objects are really truly gone and not just sitting there invisibly covering up the hotspots.

eshiel

ha, got it!
apparently the default cursor on the new hotspots was set to interact rather than look, which is why they weren't coming up. all good now!

SMF spam blocked by CleanTalk