punky. 13 Posted October 31, 2022 Hello, after few days of a constant fight with the workbench we re almost out of ideas by now so I came here on our behalf ( RadioMod Team) and probably someone from BI will only be able to answer this: currently, we're trying to add attachment slots to the radio in order to attach the battery and antenna but tried two ways (actually far more) and all failed... I tried to use SlotManagerComponent to which I added two slots populated with prefabs and they show up properly and I'm able to get a lot of information like EntitySlotInfo which allows me to sift through multiple slots and find the one that I want, IEntity with GetAttachedEntity but the problem that I faced is that when I try to remove this item from this slot it persists in it for at least two reasons when I try to get storage of that slot with GetStorage() it returns null despite the fact that radio has BaseInventoryStorageComponent which in turn (i suspect) causes TryMoveItemToStorage and/or TryRemoveItemFromStorage to fail (returns false) because of the failure of the 'Try' functions I tried to force detachment by using m_attachmentSlot.DetachEntity(false) (cuz with true - default value - everything crashes) and that helped to a degree if i open the inventory ill see the battery on the left side 'in the vicinity but it's not on the ground as it will be always there even when ill move away from that spot and additionally its visibly still attached to the radio and only when I move that battery (which is in the vicinity) to my inventory then it will detach from the radio Bacon suggestions tried using AttachmenSlotComponent but this presented a lot of different problems: there doesn't seem to be any way to detect which slots grabbed besides checking what attachment type it has (attachmentComponent.GetAttachmentSlotType().Type() == AttachmentPRC152Battery) additionally although prefabs are attached it will still return null when I try to use attachmentComponent.GetAttachedEntity() (edited) This might be the root cause of those issues as for unknown reason to me BaseInventoryStorageComponent will return 0 when I ask it for the number of slots with GetSlotsCount() and I seem to be unable to 'connect' those slots to it as I can't use SetupSlotHooks(InventoryStorageSlot owned lot, int slotID) Share this post Link to post Share on other sites
punky. 13 Posted November 2, 2022 Found a way. Thanks to narcoleptic marshmallow vector mat[4]; IEntity ent = slot.GetAttachedEntity(); slot.DetachEntity(false); ent.GetWorldTransform(mat); ent.GetParent().RemoveChild(ent); ent.SetWorldTransform(mat); ent.Update(); 1 Share this post Link to post Share on other sites