Movement command in script ?

I'm using this script
http://www.rpgmakercentral.com/topic/829-xs-teleport/

What I want is when the character teleport , I want it to move face_up or face_down .

Is there any line of code for movement that I can put in the script ?
$game_player.set_direction(n)
#Direction n = [2]Down [4]Left [6]Right [8]Up
Script calls

put after $game_player.moveto
Code:
  def teleport_player(index)
    # // Method for teleporting the player to the spawn event. (if exists)
    $game_map.setup(@tp_list[index][2])
    $game_player.moveto(@tp_list[index][3][0], @tp_list[index][3][1])
    fadeout_scene
    $game_map.autoplay
    $game_map.refresh
    $game_player.animation_id = XAIL::TELEPORT::ANIM_ID unless XAIL::TELEPORT::ANIM_ID.nil?
    SceneManager.call(Scene_Map)
  end
Ohh nice! It works like a charm !!
thx for the link too !

can be closed now 🙂

Original thread: https://forums.rpgmakerweb.com/threads/movement-command-in-script.81041/