Sorry, we don't support your browser.  Install a modern browser

Allow takeObject() to search bags of bags/decks#2908

It would be useful if we could use takeObject() to take objects from bags that contain other bags and decks.
One suggestion is to separate GUIDs/indices with a slash to form a search path. E.g.:

-- 'abc123' can be a bag, an infinite bag, or a deck, and 'def456' can be the object we would like to remove from container/abc123 and spawn
container.takeObject({ guid = "abc123/def456" })

Of course, we can do this already by modifying data taken from container.getData() and replacing the original bag object with the new modified one but this can be slow, especially for large bags or when calling takeObject many times over a number of frames.

4 months ago

perhaps spawnObjectData using the object state you find from getData?

4 months ago

It’s both a matter of convenience and performance, neither of which spawnObjectData help with.

4 months ago