Yes it works!!! The scanning entity must use ENABLE_DETECT. It detects every entity in its scan range. This way, you can "select" any enemy, not just the closest one. For example, the weakest, the nearest, the fartest ...
Ahh yes, you're right. This will work.
Primary I searched a solution which avoids calling the event-functions of all entitys in scanrange and deceide if its friend or enemy.
I thought to give the c_scan function a preselected group (like scan_flag2) would be the more cleaner and at runtime faster way.
But when JCL refuses to enhance the c_scan function, I only have the option to go with the event functions.
Thank you wdlmaster.
regards,
gri