dop2000
Sorry I didn't explain the whole situation in the first time.
I have, let's say 20 troop instances. When I touch on a troop instance, it changes with some effect (shadow, color, light,... doesn't matter) and 'activates just it' so that if I then touch on a tile, an arrow shows up from that troop towards the tile which I touched.
There is a small option to change the target for a troop. You may have touched a tile by mistake, or decide to move another troop instead. When I touch a tile for the first time, it starts blinking and when I double tap, flash disables and arrow gets locked. Then, that troop instance becomes inavailable for chosing until next turn.
But the instance doesn't move yet. Then, I touch another troop instance, again onto the tilemap, and then the arrow. And so on until no troops left for choosing. Then you say to 'skip turn' (in any way, I didn't decided it yet, whether a button, double tap or else) and every instance moves along their own arrow to their target tile. And also the movement of each troop should be 'erasing' the arrow, but no worties with that, because it's the same thing you teached me before with every tick setting arrowline width according to distance.
I have done everything right when working with just one instance. But at the moment I create the rest, it's complete chaos.
I am figuring out some ways to make just one instance moves, like placing an instance variable which can be 'state': active | inactive (this actually came from you on another post, talking about ternary operators). When I touch the troop instance, it sets every other instance to inactive (in case you choose one and then decide to move another one), then sets the variable active for that instance and then compare which instances are active for the arrow event to happen. At double tapping, it locks the arrow and sets inactive again the instance.
But I don't know how to call the movement of each troop instance for their own arrow. I am trying to understand how to call a specific instance of an object, to ve able to reference it to the troop. I mean, something like- move to the arrow instance that was created afeter touching you, or the arrow touching the line that touches you, or something of the like. I don't know either if it' possible to relate the arrow instance created at touching the tile after the troop with that very troop instance touched before. Something along the lines of containers maybe...? Pin behaviour with variable attaching point?
Maybe a position variable for each could solve that?
I am running out of time and really busy these days, so I hardly can access my PC at night, just taking every bit of spare time to learn C3 with the smartphone. I'll link to my C3P later