Jefferson Luis Bernardo
Terrarian
Hello, I am creating a mod for which the User may choose the areas where he will teleport ... I would list the options on the screen and relate each option to its proper teleportation
code below
code below
Code:
public override void RightClick(int i, int j)
{
//Codigo de Teleporte
Player jogador = Main.player[Main.myPlayer];
int x = (int)(jogador.position.X);
int y = (int)(jogador.position.Y);
x = x + (40 * 16);
string posicao_x = x.ToString();
Tile piso = Main.tile[i, j];
jogador.position = new Vector2(x,y);
Main.NewText("Teleportou..!", 255, 240, 20, false);
Main.NewText(posicao_x, 255, 240, 20, false);
}