Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: cece0808 on Wed 28/12/2005 11:48:36

Title: Inventory item positions and interaction?
Post by: cece0808 on Wed 28/12/2005 11:48:36
1. Ok, I got my inventory working, and items really appear there like they should, but they appear too close to each others. How can I manage, where in the inventory window the items are shown and their positions?

2. I got my interaction in inventory working (thx to you!) but now when I interact, the cursors changes into talking cursor (looks kinda dum..). And when I try to change the cursor to interact (hand) by changing Set Cursor Mode the interaction won't work anymore!

thx!
Title: Re: Inventory item positions and interaction?
Post by: Elliott Hird on Wed 28/12/2005 12:41:34
Change the Item Width and Height in the GUI options.

Did you use UseModeGraphic?
Title: Re: Inventory item positions and interaction?
Post by: cece0808 on Wed 28/12/2005 12:50:19
How can i change items width and height? There's no such option in the GUI. And what is UseModeGraphic? Sorry but i don't understand right now!
Title: Re: Inventory item positions and interaction?
Post by: petazzo on Wed 28/12/2005 13:33:08
"UseModeGraphic" is used to override the cursor's default graphic to make it look like another cursor.
So if you use mouse.Mode = eModeTalkto;
mouse.UseModeGraphic(eModeInteract);
the Talk to cursor will look like a hand.

About Item Width:

Quote from: the manualItemWidth property
(Formerly known as SetInvDimensions, which is now obsolete)

int InvWindow.ItemWidth;

Gets/sets the width of the items in the inventory window. You should generally set this up in game_start to the width of your largest inventory item. The default is 40.
Example:

invMain.ItemWidth = 50;
invMain.ItemHeight = 30;

sets the invMain inventory window to use item cells 50x30 large.
Title: Re: Inventory item positions and interaction?
Post by: cece0808 on Wed 28/12/2005 14:29:31
ok I put that script you suggested, but the cursor still looks like Talk-to cursor! I have Set the cursor mode to 3. Is that ok? or what am i supposed to do on that "left click" action?
Title: Re: Inventory item positions and interaction?
Post by: petazzo on Wed 28/12/2005 14:40:09
You should set "Left click" on Run script, give a name to the button (if you haven't already done it), double click on it and put the code under the function line.
Title: Re: Inventory item positions and interaction?
Post by: cece0808 on Wed 28/12/2005 15:19:06
yeah ok i got that thx! now the interaction thing works perfectly! but now we got another little problem: Now the pointer arrow (to select items) looks like a hand(interaction)!