Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making a Custom Inventory Item
convolution223 Offline
Member

Posts: 78
Threads: 15
Joined: Jul 2011
Reputation: 0
#1
Making a Custom Inventory Item

Sooo I was wondering how one would go about making a custom inventory item that doesn't need to appear in-game, just in the player's inventory (they cut it out of something and voila! it's in their inventory). They would then use this to solve a puzzle. I think I can manage the coding for this, but the actual creation of the inventory item is where I'm totally lost.
07-18-2011, 04:30 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Making a Custom Inventory Item

GiveItem and GiveItemFromFile are two simple function to give player any item available.
For more information you can check the wiki http://wiki.frictionalgames.com/hpl2/amn..._functions

To create items, you can use Model Editor.

07-18-2011, 04:33 AM
Website Find
convolution223 Offline
Member

Posts: 78
Threads: 15
Joined: Jul 2011
Reputation: 0
#3
RE: Making a Custom Inventory Item

(07-18-2011, 04:33 AM)Tanshaydar Wrote: GiveItem and GiveItemFromFile are two simple function to give player any item available.
For more information you can check the wiki http://wiki.frictionalgames.com/hpl2/amn..._functions

To create items, you can use Model Editor.

I tried looking there, don't know what category an inventory item falls under:
Types of Objects


These are the kinds of objects that you can create and place in this editor. Details on each one and parameter listing in the following links:

Lights


Billboards


Particle Systems


Sounds


The following types are exclusive to the Model Editor

Shapes


Bodies


Joints


SubMeshes


Bones
07-18-2011, 05:07 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#4
RE: Making a Custom Inventory Item

It should have a model. Just model editor without a model cannot give you anything. If you really think the item you created won't be visible in game, just use another item from the game and modify it.

07-18-2011, 05:47 AM
Website Find
ThePaSch Offline
Member

Posts: 108
Threads: 11
Joined: Sep 2010
Reputation: 0
#5
RE: Making a Custom Inventory Item

I think he just wants to "warp" the item into the player's inventory without it physically appearing in the world.

convolution, to do that, you need to create a texture for your item (.tga, Photoshop does that) and place it in your custom story's directory. Then, use void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);, replacing asImageName with the name of your item image.
I don't think you need the model editor for that, but feel free to correct me.
07-18-2011, 06:25 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#6
RE: Making a Custom Inventory Item

Oh, if it's just for this, it's quite possible.
However, he said "but the actual creation of the inventory item" and actual creation of an item is through Model Editor.

07-18-2011, 06:28 AM
Website Find
convolution223 Offline
Member

Posts: 78
Threads: 15
Joined: Jul 2011
Reputation: 0
#7
RE: Making a Custom Inventory Item

(07-18-2011, 06:25 AM)ThePaSch Wrote: I think he just wants to "warp" the item into the player's inventory without it physically appearing in the world.

convolution, to do that, you need to create a texture for your item (.tga, Photoshop does that) and place it in your custom story's directory. Then, use void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);, replacing asImageName with the name of your item image.
I don't think you need the model editor for that, but feel free to correct me.

THANK YOU! I'm going to try this tomorrow. This is exactly the kind of solution I wanted since I can barely even be considered an amateur modeller.
07-18-2011, 06:46 AM
Find




Users browsing this thread: 3 Guest(s)