SetNPCTargetLocation
From Onset Developer Wiki
Description
Set the NPC's target location where it should go towards to.
Syntax
SetNPCTargetLocation(npc, x, y, z [, speed])
Parameters
- npc
The Npc identifier - x
The X axis - y
The Y axis - z
The Z axis - speed (optional)
The movement speed in cm.
Return Value
- Returns true on success.
Example
-- Makes the NPC go towards the player's location.
local x, y, z = GetPlayerLocation(playerId)
SetNPCTargetLocation(NpcId, x, y, z, 200.0)
See also
- GetStreamedNPC
- GetNPCLocation
- SetNPCOutline
- SetNPCPropertyValue
- GetNPCPropertyValue
- CreateNPC
- DestroyNPC
- IsValidNPC
- GetAllNPC
- GetNPCCount
- IsNPCStreamedIn
- SetNPCLocation
- GetNPCLocation
- SetNPCHealth
- GetNPCHealth
- SetNPCAnimation
- SetNPCHeading
- GetNPCHeading
- SetNPCTargetLocation
- SetNPCFollowPlayer
- SetNPCFollowVehicle
- SetNPCRagdoll
- SetNPCRespawnTime