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 - Wade

#1
Thanks Khris again for your help, though I actually solved this moments before your post.  I was missing the "RunInteraction(inventory)" part, I've implemented this a bit differently to how I think you mentioned.  The code for my verb coin buttons now read:

Code: ags

function Button1_OnClick(GUIControl *control, MouseButton button)
{
  if (gInventory.Visible == false)
  {
    ProcessClick (mousex, mousey, eModeTalkto);
    gVerbcoin.Visible = false;
  }
  
  else if (gInventory.Visible == true)
  {
    inventory[game.inv_activated].RunInteraction(eModeTalkto);
    gVerbcoin.Visible = false;
  }
}
#2
I discovered something interesting.  If I clicked on an inventory item, the verbcoin does not display, but if I then close the inventory window I can see the verbcoin which appears to have been hidden behind the inventory in the area where it should have shown up.  I tried using a gInventory.ZOrder = 0, and even a gVerbcoin.ZOrder = 1000, but neither of them seemed to affect this behaviour.

EDIT:  I fixed this by moving the gInventory.ZOrder and gVerbcoin.ZOrder to the repeatedly_execute rather than the on_mouse_click that displays the verbcoin.  The verb coin now displays when clicking an inventory item, but the buttons do not work.

DOUBLE EDIT:  The inventory verb coin doesn't work because processed clicks ignore interfaces.  Now to find a way around this.  :-\
#3
It doesn't appear at all.
#4
Thanks for your quick response.  Your method works quite well, now I'm just having trouble making the verbcoin appear on my click. 
#5
I've done a lot of searching and I did find similar questions to mine so forgive me if this sounds a bit familiar.  The reason I'm posting is because nothing I read really helped me, or I couldn't understand it.

I'm trying to make a verbcoin interface I'm not using any templates so the code is all from scratch.  my verbcoin works perfectly, but I'm having trouble making it work in the inventory.  I'll try and explain how my verbcoin works so you'll have a better idea of how to help me.

I made the mouse context sensitive like this:

Code: ags

else if ((GetLocationType(mouse.x, mouse.y) == eLocationObject) ||
            (GetLocationType(mouse.x, mouse.y) == eLocationCharacter))
    {
      mouse.Mode = eModeUsermode1;
    }


Usermode1 is what I use to identify the verbcoin, which is scripted like this:

Code: ags

if ((mouse.Mode == eModeUsermode1) && 
        (mouse.IsButtonDown(eMouseLeft) == true))
    {
      mousex = mouse.x;
      mousey = mouse.y;
      gVerbcoin.SetPosition(mouse.x - 25, mouse.y - 25);
      if (gVerbcoin.X < 0) 
          gVerbcoin.X = 0;
      if (gVerbcoin.X > 589)
          gVerbcoin.X = 589;
      if (gVerbcoin.Y < 0)
          gVerbcoin.Y = 0;
      if (gVerbcoin.Y > 349)
          gVerbcoin.Y = 349;
      gVerbcoin.Visible = true;
    }


The inventory is giving me problems because there doesn't seem to be a way to find out if the mouse is over an inventory item, except for eLocationNothing, which isn't specific enough to work.  I've tried various methods, while admittedly only half understanding them, to no success.

If anyone could help me I'd be super grateful.
SMF spam blocked by CleanTalk