Jump to content


Photo

Inventory Library V.2.1


  • Please log in to reply
90 replies to this topic

#1 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1730 posts
  • Version:Unknown

Posted 30 November 2004 - 10:09 PM

I created this library about a month or so ago but didn't announce it other than in the link thread. Since their have recently been two threads asking for one and several threads in other forums about making an inventory, I figure I should create an announcement.

Update: Version 2.1 available. A new action type has been added in this version known as 'object'. This action allows you to use the inventory without having the player click or knowing the slot number of the object you need. It simply searches the entire inventory for the needed object.

Several errors in the action descriptions have been fixed. Draw slot added. Draw overlay sprite added. Major changes to several actions' source code. Arguments rearranged to make them more uniform. Help file redone to be a .chd format.

Update: Version 2.0 available. Almost the all the actions have been redone and compresses. The library is now much easier to use and includes the missing action. Consequently, it is not backward compatible with version 1.x. Please read the included documentation for other changes.

Update: Version 1.1 available. Many new functions have been added, including the ability to put multiple objects in one slot, check what is in a slot, control the inventory via the keyboard and more. Tested on GM6, included demonstration GM6.

Type: .lib, .chd (help file) and .gm6-zipped

File Size: 51.8 KB

Version: 2.1

Actions:

Create inventory

Move inventory

Empty inventory

Add object

Drop object

Use object

If a slot has an object

Add other object

Set inventory sprite

Hide or show inventory

If inventory is visible

Draw the inventory

Draw multiple

Draw a selection sprite

Draw specific slot

Draw a sprite overlay


Please PM me with any bugs, suggestions or if you need help.

Download

Enjoy,
Tahnok100

Edit: Updated to version 1.1.
Edit: Updated to version 2.0.
Edit: Updated to version 2.1

Edited by tahnok100, 01 July 2006 - 09:30 AM.

  • 0

#2 nmf4505

nmf4505

    GMC Member

  • New Member
  • 68 posts

Posted 30 November 2004 - 10:23 PM

This looks great!
But i cant download it!:GM6:

You got the like workng download here:
http://www.geocities...0_Tahnok100.zip

EDIT: This need alot of work!
EDIT: You should use data stacks or data lines or somthing like that to make an invantory that can be open and closed.

Edited by nmf4505, 30 November 2004 - 10:42 PM.

  • 0

#3 Polar Productions

Polar Productions

    extremly cool games

  • New Member
  • 1429 posts

Posted 01 December 2004 - 04:59 AM

Is this for gm6 or gm5? PLease say 6.
  • 0

#4 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1730 posts
  • Version:Unknown

Posted 01 December 2004 - 09:15 AM

EDIT: You should use data stacks or data lines or somthing like that to make an invantory that can be open and closed.

<{POST_SNAPBACK}>

I really don't know why you would want to do that. What would you use an inventory for where things have to be taken out in order? If you explain better then I will look into it.


Is this for gm6 or gm5? PLease say 6.

<{POST_SNAPBACK}>

It works with both, but the demo will not load in GM6. There is an action where it tries to set it according to view_left and view_right (neither exists in gm6). Follow the error message and change the values to view_xview and view_yview. I will release the new gm6 version in the next update.

Edited by tahnok100, 01 December 2004 - 09:15 AM.

  • 0

#5 Steamboat_X

Steamboat_X

    ForgeGames

  • New Member
  • 362 posts

Posted 01 December 2004 - 07:38 PM

make drag&drop invetory , like u pick an item and drag it into ur inventory
  • 0

#6 Heavendragon

Heavendragon

    Halo 2 wiz

  • New Member
  • 322 posts

Posted 01 December 2004 - 09:14 PM

Pretty nice, just didnt like the clicking, and the style of it
Good job -_-
  • 0

#7 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1730 posts
  • Version:Unknown

Posted 01 December 2004 - 10:03 PM

make drag&drop invetory , like u pick an item and drag it into ur inventory

<{POST_SNAPBACK}>

Sorry, but I don't plan on doing that anytime soon. If you wanted to though, you could program that in yourself. Just make it so you drag the object and when it is over the inventory it adds it.

Pretty nice, just didnt like the clicking, and the style of it
Good job -_-

<{POST_SNAPBACK}>


The style was based on animal crossing. The sprites and size of the inventory can be changed though. You can also change it from having to click on the items. In the object code change the 'Left Click' event to something else.
  • 0

#8 nmf4505

nmf4505

    GMC Member

  • New Member
  • 68 posts

Posted 02 December 2004 - 12:53 AM

You should use data stacks or data lines or somthing like that to make an invantory that can be open and closed.


I really don't know why you would want to do that. What would you use an inventory for where things have to be taken out in order? If you explain better then I will look into it.


I ment that you can open and close your invantory so it dosnt take the top of the screen. An example of this is on diablo2 if you press I your invantory will dissapear when you press i again it will come back with all items in order. You could accomplish this by useing a data line so you can store your invantory data in it.
  • 0

#9 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1730 posts
  • Version:Unknown

Posted 02 December 2004 - 03:06 AM

You should use data stacks or data lines or somthing like that to make an invantory that can be open and closed.


I really don't know why you would want to do that. What would you use an inventory for where things have to be taken out in order? If you explain better then I will look into it.


I ment that you can open and close your invantory so it dosnt take the top of the screen. An example of this is on diablo2 if you press I your invantory will dissapear when you press i again it will come back with all items in order. You could accomplish this by useing a data line so you can store your invantory data in it.

<{POST_SNAPBACK}>


You can. This is designed as the basis of an inventory. However, like all official actions, it is your job to make it do what you want.

The simplest way to hide the inventory it is to create a variable and check whether or not it is true. If it is true, use 'move inventory' to move it onto the screen where you want, else, move it off screen. Or you can make the inventory object not visible and only check if the player is clicking if it is open.

The inventory object's variables are all stored locally. If you would like to save them between rooms then make the object persistent. If you would like to reference the inventory from another object (using an action other than 'add item")then you will have to wait until next update.

The inventory was designed to be extremely flexible. Play around with it a bit and you will see.
  • 0

#10 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1730 posts
  • Version:Unknown

Posted 03 December 2004 - 02:24 AM

Updated to version 1.1. Read the first post for details.
  • 0

#11 Dan1

Dan1

    As Cool As Custard

  • New Member
  • 1813 posts
  • Version:GM:Studio

Posted 04 December 2004 - 11:16 AM

very good!
I can't seem to get it work very well for multiple and what is x and y margin!
Other than that it's good and so is the example!
:GM6: :D :GM6: :GM130: :GM6:
It's for GM6
  • 0

#12 Atlas

Atlas

    GMC Member

  • New Member
  • 40 posts

Posted 06 December 2004 - 11:01 PM

I get an error when i try to use it. Am I the only one this is happening to?
  • 0

#13 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1730 posts
  • Version:Unknown

Posted 07 December 2004 - 04:41 AM

I get an error when i try to use it. Am I the only one this is happening to?

<{POST_SNAPBACK}>

Umm.. I have not gotten any reports of bugs. The only problems have been because people not using it right. Please PM me the error and I will try to sort it out.

very good!
I can't seem to get it work very well for multiple

<{POST_SNAPBACK}>

For the rest of the people reading the thread, it was not a bug, just a syntax error.

Edited by tahnok100, 07 December 2004 - 04:41 AM.

  • 0

#14 Dan1

Dan1

    As Cool As Custard

  • New Member
  • 1813 posts
  • Version:GM:Studio

Posted 07 December 2004 - 04:36 PM

I did PM you and I'm waiting for some help!
:( :) :) :P :P
  • 0

#15 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1730 posts
  • Version:Unknown

Posted 07 December 2004 - 10:30 PM

I did PM you and I'm waiting for some help!
:(  :)  :)  :P  :P

<{POST_SNAPBACK}>


Umm... uh... Atlas? Are you using two different names or am I missing something? I have been helping you Dan1 and, as far as I know, your problem has been fixed.
  • 0

#16 Dan1

Dan1

    As Cool As Custard

  • New Member
  • 1813 posts
  • Version:GM:Studio

Posted 08 December 2004 - 05:04 PM

I did PM you and I'm waiting for some help!
:)  :P  :P  :P  :D

<{POST_SNAPBACK}>


Umm... uh... Atlas? Are you using two different names or am I missing something? I have been helping you Dan1 and, as far as I know, your problem has been fixed.

<{POST_SNAPBACK}>


I'm not all that sure it is!
Could you PM that multiple example to me again, I lost it!
:P :( :)
  • 0

#17 jackaroo

jackaroo

    The Shadow Within

  • GMC Member
  • 814 posts
  • Version:GM8

Posted 08 December 2004 - 05:14 PM

Does the lib work in gm 5. Its just i need an inventory lib but i still use gm 5.

Jackaroo
  • 0

#18 Tahnok

Tahnok

    Friendly Madman

  • GMC Member
  • 1730 posts
  • Version:Unknown

Posted 08 December 2004 - 11:29 PM

Does the lib work in gm 5. Its just i need an inventory lib but i still use gm 5.


I just ran a quick test of some of the actions in 5.3a and found that only a few don't work. One in particular I found was 'Drop multiple objects'. I think as long as you don't use the multiple actions you should be OK. Note though that the demo is GM6 and you may have a hard time seeing some of the actions in the smaller GM5 window.
  • 0

#19 coolhome

coolhome

    GMC Member

  • New Member
  • 101 posts

Posted 08 December 2004 - 11:34 PM

Thats kool. :(
  • 0

#20 Dan1

Dan1

    As Cool As Custard

  • New Member
  • 1813 posts
  • Version:GM:Studio

Posted 09 December 2004 - 04:32 PM

You'll find that Inventory 1.0 is for :( and Inventory 1.1 is for :)
1.0 Does have a lot less actions but it does have a working 'drop object' thing!

And tahnok100 can I have that multiple example again? (EDIT: Thanks!)

Edited by Dan1, 10 December 2004 - 05:12 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users