Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Alaskaban on Thu 01/08/2013 23:31:18

Title: inventory help
Post by: Alaskaban on Thu 01/08/2013 23:31:18
Hello, While working on my mags game I noticed that when I click on an item in the inventory, nothing happens. The inventory just goes away and my cursor stays the same. Any help will be much aprecciated.
As always, Thank you, Alaskaban
Title: Re: inventory help
Post by: Khris on Thu 01/08/2013 23:40:53
No info, no code, no help.
Title: Re: inventory help
Post by: Alaskaban on Fri 02/08/2013 00:02:16
I was wondering if I needed to do something with what kind of cursor I was using or not.
Title: Re: inventory help
Post by: Adeel on Fri 02/08/2013 00:44:09
Alaskaban; for proper analysis of your problem, we'll have to take a look at your code. So, if you don't mind: please share that piece of code which is not working in the way it's supposed to work.
Title: Re: inventory help
Post by: Khris on Fri 02/08/2013 08:40:46
Which template / modules are you using? Or is it just a default game?
Did it not work from the start or did it fail suddenly? By "inventory goes away", do you mean the GUI disappears? Or the item?
Also, I have no idea what you mean in your second post.

And what is your game supposed to do? It sounds like you want to pick up the item from the inventory, as in, the cursor changes to eModeUseinv, with the inv item as graphic, right?

Also, are you maybe using relatively big sprites for the inventory items but didn't set the InvWindow's ItemWidth and ItemHeight to appropriate values in the GUI Editor?

MORE INFO.

And again: SHOW US YOUR CODE. Unless you're using the default game template and haven't changed or added anything except like hotspot descriptions in room scripts. But if that's the case, TELL US.

You must realize how blind we are here, right? We can't see your game, your screen or read your mind. We can only rely on what you post here.
Title: Re: inventory help
Post by: Alaskaban on Fri 02/08/2013 17:28:28
I am using the empty game template and I made my own inventory. When I click on the Item in the inventory, The gui disappears and my cursor does not change to the cursor of the item. I've tried many approaches such as using hotspots to change the cursor, or even just right clicking. None of these seem to work, I have'nt really done any scripting to the inventory yet because I don't know what I should script. I'm looking for scripting that will help me click on an item, and the item will be my cursor. Also when I get two items they overlap.
Title: Re: inventory help
Post by: xil on Fri 02/08/2013 18:42:55
If you are having trouble with a custom inventory, but don't know how to code an inventory, then you should be using a template, plain and simple!
Title: Re: inventory help
Post by: Andail on Fri 02/08/2013 19:21:18
You say you've made your own inventory... but you haven't scripted anything yet? Sorry, but Ags doesn't run on magic :) How about you open a template game and check how it's scripted, or look up inventory in the manual? We can't really go through the entire chapter of inventory scripting with you point by point, I hope you understand that!
Title: Re: inventory help
Post by: Khris on Fri 02/08/2013 21:52:19
Quote from: Alaskaban on Fri 02/08/2013 17:28:28Also when I get two items they overlap.
Quote from: Khris on Fri 02/08/2013 08:40:46Also, are you maybe using relatively big sprites for the inventory items but didn't set the InvWindow's ItemWidth and ItemHeight to appropriate values in the GUI Editor?

And why are you using the empty game template if you have no idea how to script your own interface...?
Title: Re: inventory help
Post by: Alaskaban on Sun 04/08/2013 01:35:45
I ended up just getting rid of the inventory
Title: Re: inventory help
Post by: Adeel on Mon 05/08/2013 00:13:29
Quote from: Alaskaban on Sun 04/08/2013 01:35:45
I ended up just getting rid of the inventory

Running away from the problems isn't exactly a correct way to solve them. It would be probably more wise if you re-create your game from scratch using the default template.
Title: Re: inventory help
Post by: Chicky on Tue 06/08/2013 17:28:57
Who needs an inventory anyway! those things are so 80's :-D

Alaskaban, i would suggest you reconsider posting the code. it may be helpful for others to learn from.