Interface INPCComponent.IManagedInterface
Represents the managed interface implemented by its unmanaged counterpart.
public interface INPCComponent.IManagedInterface : IUnmanagedInterface
- Inherited Members
Methods
AddPointToPath(int, Vector3, float)
Adds a point with stop range to a path container.
bool AddPointToPath(int pathId, Vector3 position, float stopRange)
Parameters
Returns
ClearPath(int)
Removes all waypoints from a path container.
bool ClearPath(int pathId)
Parameters
pathIdint
Returns
CloseNode(int)
Closes a previously opened node file.
void CloseNode(int nodeId)
Parameters
nodeIdint
Create(string)
Creates a controllable NPC with the given name. The NPC must be spawned via Spawn() separately before it appears in the world.
INPC Create(string name)
Parameters
namestringThe NPC name (must follow the same rules as normal player names).
Returns
CreatePath()
Creates a new (empty) path container.
int CreatePath()
Returns
Destroy(INPC)
Destroys the given NPC. Required because NPC removal is more than a pool release.
void Destroy(INPC npc)
Parameters
npcINPC
DestroyAllPaths()
Destroys all path containers.
void DestroyAllPaths()
DestroyPath(int)
Destroys a previously created path container.
bool DestroyPath(int pathId)
Parameters
pathIdint
Returns
GetEventDispatcher()
Gets the event dispatcher for NPC-related events.
IEventDispatcher<INPCEventHandler> GetEventDispatcher()
Returns
GetNodeInfo(int, out uint, out uint, out uint)
Gets information about vehicle nodes, pedestrian nodes, and navigation nodes in a node file.
bool GetNodeInfo(int nodeId, out uint vehicleNodes, out uint pedNodes, out uint naviNodes)
Parameters
Returns
GetNodePointCount(int)
Gets the total number of points in a node.
int GetNodePointCount(int nodeId)
Parameters
nodeIdint
Returns
GetNodePointPosition(int, out Vector3)
Gets the position of the current point in a node.
bool GetNodePointPosition(int nodeId, out Vector3 position)
Parameters
Returns
GetNodeType(int)
Gets the type of a node.
byte GetNodeType(int nodeId)
Parameters
nodeIdint
Returns
GetPathCount()
Gets the total number of active path containers.
Size GetPathCount()
Returns
GetPathPoint(int, Size, out Vector3, out float)
Gets the position and stop range of a waypoint at the specified index in a path.
bool GetPathPoint(int pathId, Size pointIndex, out Vector3 position, out float stopRange)
Parameters
Returns
GetPathPointCount(int)
Gets the number of waypoints in a path container.
Size GetPathPointCount(int pathId)
Parameters
pathIdint
Returns
GetRecordCount()
Gets the total number of loaded records.
Size GetRecordCount()
Returns
HasPathPointInRange(int, Vector3, float)
Checks whether any waypoint in the path is within the given radius of the position.
bool HasPathPointInRange(int pathId, Vector3 position, float radius)
Parameters
Returns
IsNodeOpen(int)
Checks whether the specified node file is currently open.
bool IsNodeOpen(int nodeId)
Parameters
nodeIdint
Returns
IsValidPath(int)
Checks if a path id is valid.
bool IsValidPath(int pathId)
Parameters
pathIdint
Returns
IsValidRecord(int)
Checks if a record ID is valid.
bool IsValidRecord(int recordId)
Parameters
recordIdint
Returns
LoadRecord(string)
Loads a record file for playback. Returns the record id (or -1 on failure).
int LoadRecord(string filePath)
Parameters
filePathstring
Returns
OpenNode(int)
Opens a node file for NPC path navigation.
bool OpenNode(int nodeId)
Parameters
nodeIdint
Returns
RemovePointFromPath(int, Size)
Removes a waypoint at the specified index from a path container.
bool RemovePointFromPath(int pathId, Size pointIndex)
Parameters
Returns
SetNodePoint(int, ushort)
Sets the current point within a node.
bool SetNodePoint(int nodeId, ushort pointId)
Parameters
Returns
UnloadAllRecords()
Unloads all loaded records.
void UnloadAllRecords()
UnloadRecord(int)
Unloads a previously loaded record.
bool UnloadRecord(int recordId)
Parameters
recordIdint