Thanks for the reply, but that function will just hide all entities within the scan cone. I need something like that:
1. Use vec_dist to get the distances to all entities with skill2=1 within the scan cone
2. Compare the distances to each one of them
3. Determine which is the smallest distance
4. Set the "you" pointer to the nearest scanned entity
This is the sequence, but i just don't know how to make it work.