Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Jared on Wed 19/08/2009 09:23:03

Title: Inventory Interact() function (Nothing to see here)
Post by: Jared on Wed 19/08/2009 09:23:03
Deleted post.
Title: Re: Inventory Interact() function
Post by: Dualnames on Wed 19/08/2009 09:43:53
I really have no clue what EXACTLY do you want to do...I got what your problem is, but not exactly.

Quote
.. hang on, I've just had a brain-wave... nope, that didn't work either. I was thinking of making a custom button for the inventory that called both the talk() function and setGlobalInt, so that I could run a getGlobalInt under Inventory_Talk() to see if the user had selected talk or interact, but that doesn't seem to work..


You can create a custom function

function InventoryTalkTwo(InventoryItem*itemhere, int globalinttoset) {
itemhere.RunInteraction(eModeTalkTo);
return globalinttoset;
}


So then you can use:

if (InventoryTalkTwo(ikey,5)==6) {
}
Title: Re: Inventory Interact() function
Post by: Jared on Wed 19/08/2009 10:26:04
Deleted post.
Title: Re: Inventory Interact() function
Post by: Khris on Wed 19/08/2009 13:15:58
-Add a cursor
-In General settings, set "Handle inventory clicks in script" to True
-in on_mouse_click, add
  else if (button == eMouseLeftInv) {
    if (mouse.Mode == eModeTalk) {
      ...
    ...
  }


I'm still not really sure what functionality exactly you need though.

Please try to explain what your game is supposed to do without using any programming/scripting terms.
Title: Re: Inventory Interact() function
Post by: Jared on Thu 20/08/2009 04:33:28
Deleted post.
Title: Re: Inventory Interact() function (Nothing to see here)
Post by: Khris on Thu 20/08/2009 13:03:12
Is this solved...?
Why did you delete all your posts?
Title: Re: Inventory Interact() function (Nothing to see here)
Post by: Dualnames on Thu 20/08/2009 14:38:10
Jared I know this is for the MAGS so is everything cool?
Title: Re: Inventory Interact() function (Nothing to see here)
Post by: Jared on Sun 23/08/2009 07:20:58
It's not for the MAGS, it's a separate project actually.