Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Nine Toes on Thu 05/02/2004 02:07:27

Title: Use inventory on GUI?
Post by: Nine Toes on Thu 05/02/2004 02:07:27
Is there a function that will enable me, after I open my inventory window and select an item, to use the selected item on a GUI?

I've looked through the manual, and the Tech Archive, I can't seem to find anything that might help me.

Thanks in advance.
~Sully
Title: Re:Use inventory on GUI?
Post by: Gilbert on Thu 05/02/2004 02:26:51
I think something like this may work (in theory):

Set the button of a GUI to "run script..." on left click action, say, this is button 3 of GUI TEST, then script something like this:

if (interface==TEST){
__if (button==3){
_____if(GetCursorMode()==4){ //use inv mode
_______if(character[CHARID].activeinv==3){blahbla}
_______else if(character[CHARID].activeinv==9){blahbla} ....
}
}}





Title: Re:Use inventory on GUI?
Post by: Ishmael on Thu 05/02/2004 08:01:23
I think the on_event function could help you... Study the manual for global script function references... or whatever..

I'll be on my own computer this evening, so then I might wrap up something which could work in theory too...
Title: Re:Use inventory on GUI?
Post by: Nine Toes on Thu 05/02/2004 08:30:50
Hell yeah, Gil@!

It works.  (sorry TK)  Thanks much. ;)

On the other hand, TK... I would be interested to see what you can come up with... just in case... ???