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
Usermode1 is what I use to identify the verbcoin, which is scripted like this:
Code: ags
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.
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:
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:
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.