How to keep event x y at center of the screen?

is there a way to break an event out of the map grid? I want it to remain at the center of my screen like a UI element for me to request animations ontop of. I'm thinking something like
Code:
$gameMap.event(19)._realX = mapMiddleX
$gameMap.event(19)._realY = mapMiddleY
$gameTemp.requestAnimation([animationCoordinates.animationPlayer],1,false)
But it keeps drifting away to outer space when the character moves around, as it remains relative to it inside the map grid.
You could use something like this in a Script command:
JavaScript:
const ev = $gameMap.event(19);
const tw = $gameMap.tileWidth();
const th = $gameMap.tileHeight();
const px = Graphics.width / (2 * tw);
const py = Graphics.height / (2 * th);
ev._y = ev._realX = $gameMap.displayX() + px;
ev._x = ev._realY = $gameMap.displayY() + py;
You'll need to run this every frame (e.g. in a Parallel event) otherwise the character's sprite will drift into the nearest tile. Note that this kind of thing will completely break the engine's default collision system. It will also be 1 frame behind the player's current movement, because the map updates events before the player.

A better solution may be to find a plugin that lets you play animations at a point on-screen, or on a picture, etc. For example, VisuStella Core Engine has a plugin command for play anim at X, Y:
I see, thanks!

Do you happen to know where in the source code the $gameTemp.requestAnimation is defined?
It's defined in rmmz_objects.js. However, I think what you really want here is the targetPosition method of Sprite_Animation, in rmmz_sprites.js. You'd also need a bit of extra structure to tie that to the interpreter.

If you're just averse to VisuStella, I'm pretty certain there are alternatives available. E.g.
Cool! I'll take a look at sprite animation.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-keep-event-x-y-at-center-of-the-screen.152380/