swamp_dead_tree

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
RayB
Posts: 140
Joined: Fri Mar 06, 2015 3:45 am

swamp_dead_tree

Post by RayB »

I was looking to find out about being able to place and remove an item in the hole of the swamp dead tree. I found an old post with examples on using a surface component. The same post also included a socket component example.

I was interested in the socket example so I tried it. I am able to place and object into the hole but once there I can't remove it.

Can anyone explain what might me going on?
User avatar
Zo Kath Ra
Posts: 931
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: swamp_dead_tree

Post by Zo Kath Ra »

RayB wrote: Sat May 09, 2020 3:41 pm I was looking to find out about being able to place and remove an item in the hole of the swamp dead tree. I found an old post with examples on using a surface component. The same post also included a socket component example.

I was interested in the socket example so I tried it. I am able to place and object into the hole but once there I can't remove it.

Can anyone explain what might me going on?
Please upload an example dungeon.
minmay
Posts: 2768
Joined: Mon Sep 23, 2013 2:24 am

Re: swamp_dead_tree

Post by minmay »

ClickableComponents are prioritized over items in a SocketComponent, so if any part of your ClickableComponent box is in front of the item, it can make it difficult to pick up. A simple solution is to disable the ClickableComponent in the SocketComponent's onInsertItem hook and re-enable it in the onRemoveItem hook.
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.
Post Reply