Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Sam. on Tue 29/06/2004 15:15:44

Title: mouse out inventory off
Post by: Sam. on Tue 29/06/2004 15:15:44
this is a mix of a basic and advanced scripting thing. I have an Inventory windo that comes up right how i want it to but i want it to go off on mouse out. To clarify, When i move my mouse out of the inventory window, i ant it to ckose. what script would I need to do this, (and heres the basic part) exactly where in the global script would I need to put it?
Title: Re: mouse out inventory off
Post by: Proskrito on Tue 29/06/2004 15:25:09
maybe in repeatedly execute? something like:

if (IsGUIOn(INVENTORY)==1 && GetGUIAt(mouse.x, mouse.y)!=INVENTORY)
GUIOff(INVENTORY)
Title: Re: mouse out inventory off
Post by: Radiant on Wed 30/06/2004 11:48:34
Yes, except that rep_ex doesn't get called if the inventory window is pop-up modal. So make sure it isn't.

Title: Re: mouse out inventory off
Post by: Sam. on Wed 30/06/2004 12:10:49
that works perfectly, thanks very much