I've been trying for hours to fix this issue that is driving me mad. I have two zones that can be captured with soldiers in my game. My problem is that when reinforcements are created for the enemy faction, for one tick, the soldiers are at 0, 0. Which is covered by the player's capture zone, this causes the zone to think that there are more enemies than friendlies in the zone during that tick, thus triggering a game over state.
I've tried and tried to make sure that the enemies are created on the spot, but it doesn't seem to be possible, I actually have to create the sprite at 0, 0 and THEN move it to the place it should be. I tried to solve this by having an isActive flag on the soldiers, which are only set to true after I've set their position. This worked initially but since then I had to revert some code that I changed attempting to fix the problem. But once I discovered that I could do it by having the isActive bool I reverted those changes. And suddenly that solution no longer works. It is really hard to explain but my question is just if it is possible to initialize an object to spawn at a certain position right from the get go, instead of being created at 0, 0 and then moved.
Some help would be greatly appreciated.