I'm trying to script something but I've ran into a problem, I'm trying to do something in condition field of UserActions in a certain config.cpp of an addon, the line goes like this:
condition="this distance (nearestObject [this, ""TEN_TestMarine""]) <2";
The code works fine, but the problem is that script detects me, because I'm the same unit class (TEN_TestMarine) and I have another unit of that class 50m away, condition triggers right away because it detects me as that class, but I want it not to detect me, but the next closest soldier of the same class.
Is there any way to do this?