setPedTurnToFace
Queues GTA's native body-turn task so an owned ped faces another live ped.
Syntax
bool setPedTurnToFace(ped thePed, ped targetPed)GTA task mapping
0639 CTaskComplexTurnToFaceEntityOrCoordSCM equivalent: TASK_TURN_CHAR_TO_FACE_CHAR
Neon uses GTA's entity constructor with the opcode's 0.5 heading-rate multiplier and 0.2-radian completion tolerance. The task builds its own AchieveHeading subtask.
Arguments
thePedpedLiving streamed ped simulated by this client.
targetPedpedDistinct living streamed ped to track while turning.
Returns
true when GTA accepted the scripted task; false for invalid peds, streaming, liveness, ownership, or task construction.
Ownership and lifecycle
Low-level ped task calls require the client that simulates the living, streamed ped. Driving tasks also require control of the streamed vehicle. They do not create lifecycle handles; the optional native-task-runtime adds server-owned route epochs and reconstruction for drive_to routes. Gang-tag ownership is resource-exclusive, survives object streaming and recreation, and is released automatically when the owner stops.
OOP aliases
ped:setTurnToFace(targetPed)
Where this comes from
Continue exploring
← Back to the Neon Lua API · How Native ped tasks and gang tags works →