Other way: Why you don`t make a event at the scanned entities? Your Player make a scan and all entities that would be scanned becomes the event EVENT_SCAN. And now you can check in the event from all entities, is the skill51 set or not.