About Store Forum Documentation Contact



Post Reply 
Custom Inventory
Author Message
AndrewBGS Offline
Member

Post: #1
Custom Inventory
I'm trying to make my custom inventory since I was having way too much trouble trying to please the Esenthel inventory concept. I ran into the following problem:

the functions to pick up the item and throwing it down; those Game.World.move.... functions, which required a Memx container; I can't use them, since I don't have a Memx container any more.

Can someone else that implemented their own inventory system without Memx'es please let me know how they implemented the picking up and dropping down of items from/to wrold?
08-07-2013 10:55 AM
Find all posts by this user Quote this message in a reply
Pherael Offline
Member

Post: #2
RE: Custom Inventory
It should be easy

For example dropping

item_in_world = objCreateNear(...); // create base for your item in world
item_in_world.copy(item_in_storage); //your method coping data you need from one item to another ;
storage_items.remove(item_in_storage); //remove item from storage and delate it

Example for picking (picked_up_item is pointer to item in world)

storage_items.New().create(picked_up_item); //your method that create using pointer to item from world
MemxObjForItemsInWorld.removeData(picked_up_item); //remove item from world

Didnt test it, ideas from my head.
08-07-2013 11:26 AM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #3
RE: Custom Inventory
Thanks, I did manage to improvise something for picking it up, but I couldn't manage to put it back into the world. That objCreateNear() sounds like the function I'm looking for. I'll check it out when I get home. Hope it works.
08-07-2013 11:57 AM
Find all posts by this user Quote this message in a reply
Post Reply