2DWorlds Forums
Buildism Lua question - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13)
+--- Thread: Buildism Lua question (/showthread.php?tid=8158)



Buildism Lua question - umadtoobad - 08-26-2011

Ok so, I am trying to make a script that teleports the player, but I don't know how to change the position?


RE: Buildism Lua question - Qwertygiy - 08-26-2011

player.Character.Body.Position = Vec2D(xposition, yposition)

or

char.Body.Position = Vec2D(xposition, yposition)

where in the first line, player is the Player and in the second, char is the Character. xposition is the X-value of where you want to go to and yposition is the Y-value.