The Daily Click ::. Forums ::. Klik Coding Help ::. Inventory Again!
 

Post Reply  Post Oekaki 
 

Posted By Message

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
4th January, 2007 at 21:21:34 -

This is causing me a headache now, Basicly im using this http://www.solcon.nl/s.tennapel/inventorytgf.gam as a base for my inventory system,
I have now begun to make it into a usable inventory system but my problem is as follows...

i have created a cursor object that appears when i click on the slot, i want to be able to delete what ever is in that slot. I have tried lots of things but my coding sucks pretty badly and i cant seem to find a way round it, Plus im trying to make the items stackable. if anyone can give me some pointers or even add that to this example that would be amazing. Thx for your time.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
5th January, 2007 at 09:19:14 -

Antworx, I D/L'd this last night at home but it said I was missing an extension. (I forget just which one but I think it began with "F"). If I have MMF1.5 that shouldn't make a difference, right?

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Aptennap



Registered
  23/04/2004
Points
  916
5th January, 2007 at 09:34:39 -

You need the fast loop extension for this...

 
Oh sweet mary.

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
5th January, 2007 at 15:14:11 -

if anyone can solve my problem i will be forever in your debt.

 
n/a

~Matt Esch~

Stone Goose

Registered
  30/12/2006
Points
  870

VIP Member
5th January, 2007 at 15:55:21 -

http://www.acecs.plus.com/inventorytgf[delete].gam

Thats the delete code

What do you mean by "stackable"?

Image Edited by the Author.

 
http://create-games.com/project.asp?id=1875 Image


Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
5th January, 2007 at 16:55:48 -

Combining multiple items together in the same slot?

I.E

[potion] [potion] [potion]
[empty] [empty] [empty]
[empty] [empty] [empty]
[empty] [empty] [empty]

would become

[potion * 3] [empty] [empty]
[empty] [empty] [empty]
[empty] [empty] [empty]
[empty] [empty] [empty]



Maybe.

 
My signature is never too big!!!

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
5th January, 2007 at 22:05:42 -

Yeah, like in Baldur's Gate you can combine arrows into a single stack of 20 that only takes up one inventory slot instead of 2 or 3.


Image Edited by the Author.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
6th January, 2007 at 20:20:22 -

yeah thats exactly what i mean, instead of having 3 potions taking up 3 spaces, i have 1 space with 3 potions in it.

Thx for the delete code, but for some reason it delets the selected item plus other items randomly, ive looked at the code but cant figure out why.

Image Edited by the Author.

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
14th January, 2007 at 20:50:30 -

damn, im still having trouble.... I CALL UPON THE MIGHTY POWERS OF THE RADIX!!!

 
n/a

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
15th January, 2007 at 07:09:10 -

What you're asking isn't particulary difficult so I'll have a look at the code tomorrow since you asked so nicely.

I had a quick look at that first gam; didn't check the code but it looks like it just emulates a multi-slot inventory and actually only stores each item in a single variable.

Question: Do you want multiple items of the same type to ONLY take up a single slot (with a number), or do you want it to be possible for them to take up multiple slots AND be stacked?

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
15th January, 2007 at 11:49:37 -

yeah i would really appreciate a stack system with a number. (preferably with a limit ie 20potions then a new stack will begin) and a stable drop system. This has been causing me a headache for ages and i am really appreciative for the help, thanks again

 
n/a

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
15th January, 2007 at 23:49:10 -

Okay, I was about to write it for you and then I realised the first file was a gam so you're probably using TGF. I don't have TGF installed. Is a MMF1.5 or MMF2 file okay or should I dig through my backups?

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
16th January, 2007 at 06:57:29 -

im using mmf2, im using the gam file cause its the only inventory i have seen. so mmf2 would be great.

 
n/a

Reno



Registered
  11/01/2005
Points
  906
16th January, 2007 at 20:46:56 -

ya what Phizzy said. Item stacking. use arrays and string parser to handle everything. The array would even stay in memory unless you decide to export it to a file.

 
Reborn Again

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
16th January, 2007 at 21:01:38 -

That's what I'm doing now (although it's just a one-dimensional array). Only a couple events away from being finished, which I'll do after lunch if I have time.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click