First, what I have done:
I have implemented a unit shuffling system for a block wargame, where you select X pieces, and shuffle them so your opponent no longer knows which is which. That was relatively simple: store the cursor coordinates as global properties, send all selected pieces to shuffle deck, send them back to the coordinates one by one with an incrementing loop increasing the y-coordinate value.
What I want to do:
The same thing, but return each of the pieces to a different one of the set of coordinates that they started at.
One problem:
I don’t really want to arbitrarily cap the number of pieces this can be done with, so I don’t want to have X * 2 global properties to store all the coordinate sets. So I was thinking maybe the initial command can have each selected piece write its coordinates to a single global property using string functions somehow? But I have no idea how to approach this or whether it is feasible.
Anyone have any solutions? Not necessarily restricted to the vague idea I had. Or just tell me it’s impossible without custom code. Any contribution would be appreciated!