Page 1 of 1

Defining new container sizes.

Posted: Fri Nov 14, 2014 11:45 pm
by cameronC
Looking at the scripting reference, the ContainerItem component has getCapacity but no setCapacity function. The capacity of the container is defined by the containerType, which just seems to have "sack" (9 slots) or "chest" (16 slots) as the only options I can find (Defining anything else gives us no slots when the item is opened).

Does anyone have any idea on how to define new containerTypes and the amount of slots they have? For instance, a containeritem with 2 or 4 slots?

Re: Defining new container sizes.

Posted: Sat Nov 15, 2014 12:05 am
by cromcrom
I would love something like that too :-)

Re: Defining new container sizes.

Posted: Sat Nov 15, 2014 12:43 am
by akroma222
Isnt there a pellet ammo box that can be opened the same way a sack/box can?

Re: Defining new container sizes.

Posted: Sat Nov 15, 2014 12:47 am
by cameronC
akroma222 wrote:Isnt there a pellet ammo box that can be opened the same way a sack/box can?
There is pellet_box, but that is just ammo and not a container. sack has 9 slots and containerType "sack" and wooden_box has 16 with containerType "chest". Those aer all I can find in the editor, at least.

Re: Defining new container sizes.

Posted: Sat Nov 15, 2014 12:50 am
by akroma222
Ahh I see, I know mortar, sack and chest were the only container types in LoG1
And the mortar has been redone so its not really a container like the others now....

Re: Defining new container sizes.

Posted: Sat Nov 15, 2014 2:17 am
by Grimfan
akroma222 wrote:Ahh I see, I know mortar, sack and chest were the only container types in LoG1
And the mortar has been redone so its not really a container like the others now....
Which of course creates its own question. How to create an object like the mortar (like Germanny's toolbox)?