Automatic Piece Movement

I am developing a game in which a large number of pieces need to be moved each turn, in a very predictable way. I am trying to automate this and am trying figure out how. This is what I have so far:

I use a move counter. I have a large number of regions on the board with a name like spot1 spot2 spot3, etc…
The pieces that need to move have a “move to location” trait that combines “spot” with the current move counter. I.e. spot3
I guess this uses basic concatenation and I only stumbled across it by trial and error.

This works, but I have a few more requirements and it doesn’t work on pieces that the players use. Is there a way to take a piece’s current location, like spot3, and separate the “spot” and the 3, increment the 3 to 4, and put it back together? So, if a piece is on spot3, it will be moved to spot4. I need this to work on a couple different tracks so it will be like tracka1, tracka2 and trackb1 and trackb2, etc…



I believe the way to do this would have your “send to locations” set to send to spot$SpotNumber$. Your pieces can have a “dynamic property” for the value SpotNumber and you would send a command to the pieces to increment the SpotNumber by 1 and then send them to the new location.

You could probably use some variation of this concept.

I’ve made progress. So I have several “tracks”… A piece placed in the track should advance by one location (irregular grid) when a key is pressed or something. It should also “loop” as the tracks go round and round. I’ve started using zones to differentiate between the zone and the location within the zone, but it seems I can’t use the same region names in different zones.

Also, this would all be a lot easier if I could cut up strings… Is there any way to do that without writing an extension?