SetPlayerPosition Client function

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

This function was added in version: 0.0.0

Sets the given player's absolute position to the given coordinates.


void setPlayerPosition(int id, float x, float y, float z);

Required Arguments

  • x: absolute x coordinate.
  • y: absolute y coordinate. Note that in Gothic, the y-axis is the axis that points upwards.
  • z: absolute z coordinate.


local function teleportPlayer(id1, id2)
    local toPos = getPlayerPosition(id2);
    setPlayerPosition(id1, toPos.x, toPos.y, toPos.z);

Related functions