Does anybody know what ItemConstrainBox does?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Does anybody know what ItemConstrainBox does?

Post by MrChoke »

I am wondering what this component does. Doors have two of them. I can turn them on and off and I can't see any difference. Anybody know?
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Does anybody know what ItemConstrainBox does?

Post by minmay »

Items cannot be dropped on the ground within an ItemConstrainBox. Whenever an item has a model that overlaps spaces an item could be (and isn't already an obstacle), it should have one or more ItemConstrainBoxComponents to prevent dropping items in that space, so that items cannot become hidden under the model. Examples: pedestal, forest_ruins_arch, beach_puzzle_statue.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Does anybody know what ItemConstrainBox does?

Post by MrChoke »

minmay wrote:Items cannot be dropped on the ground within an ItemConstrainBox. Whenever an item has a model that overlaps spaces an item could be (and isn't already an obstacle), it should have one or more ItemConstrainBoxComponents to prevent dropping items in that space, so that items cannot become hidden under the model. Examples: pedestal, forest_ruins_arch, beach_puzzle_statue.
Ok, makes sense. Though I don't think it really does anything for Doors. I made a door that does not have these constrain boxes and it behaved the same. However, I made a beach_puzzle_statue and found that without the boxes defined, objects can be dropped into the model and fly through as well.
Post Reply