inventory help

Started by Alaskaban, Thu 01/08/2013 23:31:18

Previous topic - Next topic

Alaskaban

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

Khris

No info, no code, no help.

Alaskaban

I was wondering if I needed to do something with what kind of cursor I was using or not.

Adeel

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.

Khris

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.

Alaskaban

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.

xil

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!
Calico Reverie - Independent Game Development, Pixel Art & Other Stuff
Games: Mi - Starlit Grave - IAMJASON - Aractaur - blind to siberia - Wrong Channel - Memoriae - Point Of No Return

Andail

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!

Khris

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...?

Alaskaban

I ended up just getting rid of the inventory

Adeel

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.

Chicky

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.

SMF spam blocked by CleanTalk