FaceNearestPC()

Causes an NPC to face the nearest visible PC.

void FaceNearestPC();

Description

Causes an NPC to face the nearest visible PC.



Requirements

#include "nw_i0_2q4luskan"

Version

1.22

Example

// 1.24 source for this function
void FaceNearestPC()
{
    vector vFace = GetPosition(GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN));
    SetFacingPoint(vFace);
}

See Also

categories: Conversation Functions


 author: Tom Cassiotis