@name Holo NPC
@inputs Scan Attack 
@persist NPC:entity

O = owner()
OP = O:pos()

if (Scan & ~Scan) { findByClass("npc_alyx")
    NPC = findClosest(OP)
    NPC:npcRelationship("player","neutral", 900)
    NPC:npcRelationship(O, "like", 999)

}

if (NPC) { interval(1000)
    DPos = NPC:pos() - OP
    WP = OP + DPos:normalized()*100
    
    if (DPos:length()>50) {NPC:npcGoRun(WP)}
    else {NPC:npcStop()}
    
    if (Attack) {
        NPC:npcAttack()
    }
}



