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

Callback functions for dealing objects#1926

I’ve been trying to do something pretty simple, and it’s getting very laggy. The bag contains several decks. The bag deals a deck to the player, spreads the cards, and applies a tag to each card. To do this, the script has to get references to the objects each time so that it can finally add the tags it requires elsewhere.
For taking the deck out of the bag, deal doesn’t return a reference, dealToColorWithOffset does but only works with decks, so takeObject works.
For dealing the cards from the deck to the player, deal doesn’t return a reference, dealToColorWithOffset and spread both work but neither have a callback, so takeObject works again.
The resulting script requires one drawn-out function that ends up manually recreating the functions that should’ve worked fine in the first place. Please add callback functions to those places so that we can use the built-in API functions.

a year ago