Skip to content

face_away_from

The face_away_from function makes the player face away from a specified location in the game world. This function is useful for positioning the player to face the opposite direction of a given point.

Parameters

  • x (number): The x-coordinate of the location to face away from.
  • y (number): The y-coordinate of the location to face away from.
  • z (number): The z-coordinate of the location to face away from.

Example Usage in Lua

Here is an example of how to use the face_away_from function in Lua:

local api = ...

-- Function to make the player face away from a specified location
function FaceAwayFromLocation(x, y, z)
    api.face_away_from(x, y, z)
    print("The player is now facing away from the location: (" .. x .. ", " .. y .. ", " .. z .. ")")
end

-- Example usage: Make the player face away from the location (100, 200, 300)
FaceAwayFromLocation(100, 200, 300)