Moving an enemy's battler

Hello,
I searched and I didn't find a topic related to this.
I would like to know if there is a way to move an enemy battler in the same way that you could move an image, by just manipulating its x and y?
A way to do that exists, but how you can do it depends a lot on when you want to do it. You can do it with a script call as well, but I am not sure I would recommend it. The implementation depends a lot on what you exactly need. Could you be more specific?
I need a battler to go to the right, Out of the screen.
If you know what battler you are talking about (as in troop id of that battler) you can get it from the scene itself.
Code:
spriteset = SceneManager.scene.instance_variable_get(:@spriteset)
enemies = spriteset.instance_variable_get(:@enemy_sprites)
Once you do that, you have every enemy sprite in your troop stored inside "enemies". You can access the N element of that array using
Code:
enemies[N] # N is the ID of your battler in the troop array

Moving ti is just as moving a normal sprite with x and y coordinates. If you want it to move to the right side you increase its X coordinate, if you want it to move down you increase its Y coordinate (decrease those coordinates if you want to move it respectively toward the left side or up).

All this can be placed in a single script call in an event with a small loop taking care of the movement itself.
Spoiler: It should resemble something like this
Code:
# shift a sprite to right side
ppf = 4 # pixels per frame
spr_id = 3 # id of the enemy in the troop array
spriteset = SceneManager.scene.instance_variable_get(:@spriteset)
enemies = spriteset.instance_variable_get(:@enemy_sprites)
spr = enemies[spr_id]
while ((spr.x - spr.ox) < Graphics.width)
  spr.x += ppf
  Fiber.yield
end

Original thread: https://forums.rpgmakerweb.com/threads/moving-an-enemys-battler.112471/