SetNPCFollowPlayer: Difference between revisions
From Onset Developer Wiki
No edit summary |
FlyingFork (talk | contribs) No edit summary |
||
Line 13: | Line 13: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
AddCommand("follow", function(player) | |||
SetNPCFollowPlayer(npc, player) | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:NPCFunctions}} | {{Template:NPCFunctions}} |
Latest revision as of 14:26, 26 June 2021
Description
Set a NPC to follow the specified player.
Syntax
SetNPCFollowPlayer(npc, player [, speed])
Parameters
- npc
The NPC identifier. - player
The player identifier. - speed (optional)
The speed.
Return Value
- This function returns nothing.
Example
AddCommand("follow", function(player)
SetNPCFollowPlayer(npc, player)
end)
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