I have a strange problem with duplicates.
I'm making a cute little medievil Lemming-ish battle engine. In short, a load of tiny soldiers come running from the left and right for a big clash in the middle. There are three types of units, swords, spears and cavalry. You decide the number of each type of unit before the clash. The damage calculating uses small "bullets" that are created in specific frames of the battle animation, one type of "bullet" for each type of unit and side i.e
The bullets appear at the striking area of the animation (i.e speartip) for a loop or two. If an enemy unit is hit by the bullet it takes damage and is thrown back.
This all works fine most of the times. Swords vs swords is good and even, cavalry vs swords trashes the swords in the blink of an eye, spears against cavalry leaves the spears winning most of the time and swords vs spears is + for the swords. Almost like rock paper scissors.
But when sending in the purples' swords + spears against ANYTHING from the blues' purple win every time without losing any unit whatsoever.
The code is identical between both sides and in the same order. Everything animation and hotspot/actionpoint-wise is IDENTICAL. I've checked the code and re-checked it and then re-checked it a few times more.
The sole difference between the two sides is that the purples' code comes after the blues', but one of them has to be after the other.
If anyone has any idea of what may be going on please tell me.
It could have to do with priorities of the code structure when creating/defining new detector objects. It might be a better idea to have only a single detector object, which inside of your loop would be positiioned at every units hit location in turn.