Jump to content

Is it possible for bundle to detect specific items in it?


Recommended Posts

So say I create a custom item and give it component called "A".
Is it possible to separate bundles with this specific item inside and ordinary bundles?
Say, if the bundle contains item with component A then give the bundle itself component B or tag B?
Im too stupid to understand bundle mechanics...

Edited by Last_epilogue
Link to comment
Share on other sites

You can change the OnFinishBundling() function on bundler component. Test each item, checking for component "A", tag or other and then give to wrapped objetct the component/tag B

Edited by Leonidas IV
Link to comment
Share on other sites

I am trying to do

wrapped.components.unwrappable:WrapItems(items, self.inst)
if item.components.A then
           wrapped.components.inventoryitem = HasTag("B")
        end
    inst:Remove(),

but its not working...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...