SetMyFacingAngle
Revision as of 15:16, 18 March 2022 by 137.97.114.225 (talk)
Description:
Sets the facing angle of an NPC
Parameters:
(angle)
angle : The new angle (in radians) for the NPC.
Return Values:
This function does not return any specific values.
Example
function OnPlayerText(playerid, message) { if(message=="lookatme") { local pos=GetPlayerPos(playerid);local mypos=GetMyPos(); local angle=atan2(-(pos.x-mypos.x),pos.y-mypos.y) SetMyFacingAngle(angle); } }
Related Functions
The following functions may be helpful as they relate to this function in one way or another.