Hi again !
1 - Now i have saved in the skill my._ds_OpponentClosestDIST the distance between my and the closest opponent;
2 - And i want to iterate all the entities list and return which entity is the ds_MOST_FREE_ENTITY, i mean, which entity is far away from the closest opponent;
3 - Its not working and my eyes are burning today;
Code:
function test_ITERATE_ENTITIES()
{
var iDist;
var i;
you = 0;
while( i < ds_numberOfEntities)
{
if(ds_scan_array_list[i] == 0)
{
i += 1;
continue;
}
temp_ITERATE_ENT = ptr_for_handle(ds_scan_array_list[i]);
i += 1;
if(!temp_ITERATE_ENT)
{
continue;
}
if(my._ds_OpponentClosestDIST > iDist)
{
you = temp_ITERATE_ENT;
iDist = my._ds_OpponentClosestDIST;
}
}
ds_MOST_FREE_ENTITY = you;
return (iDist);
}
Thanks for your time.