how to get the current player's x and y?

Help me I'm so confused on where did the game assigns the player's current x and y. Do I have to make another method to do this?
Ruby:
class Player_Actions < Game_Player
  def initialize
    super
    @sprite = Sprite.new
  end
 
  def draw_hitbox(x, y)
    @sprite.bitmap = @bmp
  end
 
  def attack_state
    
    @get_dir = "right" if Input.repeat?(:RIGHT)
    @get_dir = "left"  if Input.repeat?(:LEFT)
    @get_dir = "up"    if Input.repeat?(:UP)
    @get_dir = "down"  if Input.repeat?(:DOWN)
    
    if Input.trigger?(:C)
      msgbox(@x)
      msgbox(@y)
      draw_hitbox(0,0)
    else
      @sprite.visible = false
    end
    return
  end
end
it would help to get some context here.

for example your code talks about attacks, but there is no xy for the player on the battlescreen, the only xy exists on the map itself.
it would help to get some context here.

for example your code talks about attacks, but there is no xy for the player on the battlescreen, the only xy exists on the map itself.
In other words I need the algorithm or formula for the grid based character movement of this engine since I only wanted the hitbox to follow the player
the grid coordinates can be called by control variable (inside game data), and there is a pinned topic that lists the script equivalent of all event commands.

please check that equivalent there, I don't have it in memory. It's been too long since I used VXA last.
the grid coordinates can be called by control variable (inside game data), and there is a pinned topic that lists the script equivalent of all event commands.

please check that equivalent there, I don't have it in memory. It's been too long since I used VXA last.
k thnx this thread can be closed right now

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-the-current-players-x-and-y.152611/