Language

Player.setPosition


Player.setPosition(float x, float y)

Description

Set the player positon.

Parameters

x
The X position.
y
The Y position.

Examples

Teleport player

This example shows how to teleport a player when he touchs a specific trigger.

  1. function onTrigger(name, state)
  2.     if name == "teleportToBoss" then
  3.         Player.setPosition(1300, 100)
  4.     end
  5. end