Is there a way to play an animation BEHIND a sv_actor/enemy?

The title says pretty much everything, i want to play an animation behind a target, its a special case, i'm trying to make that first leaf animation to play behind my character in the first pose with the open mouth, so i dont have to make it play so precise over the line
monstrinho_bite-sem-transp.gif


Is there a way? Or maybe a plugin?

I've just tried but it didnt work, i figure its some kind of conflict with that plugin that controls sprite plugin?
Code:
Sprite_Animation.prototype.updatePosition = function() {
    if (this._animation.name.contains("TPZH")) {
        this.z = -1;
    } else {
        this.z = 8;
    }
    if (this._animation.position === 3) {
        this.x = this.parent.width / 2;
        this.y = this.parent.height / 2;
    } else {
        var parent = this._target.parent;
        var grandparent = parent ? parent.parent : null;
        this.x = this._target.x;
        this.y = this._target.y;
        if (this.parent === grandparent) {
            this.x += parent.x;
            this.y += parent.y;
        }
        if (this._animation.position === 0) {
            this.y -= this._target.height;
        } else if (this._animation.position === 1) {
            this.y -= this._target.height / 2;
        }
    }
};
Maybe try this instead? Put near top probably.
Code:
Sprite_Animation.prototype.updatePosition = function() {
    if (this._animation.name.contains("TPZH")) {
        this.z = -1;
    } else {
        this.z = 8;
    }
    if (this._animation.position === 3) {
        this.x = this.parent.width / 2;
        this.y = this.parent.height / 2;
    } else {
        var parent = this._target.parent;
        var grandparent = parent ? parent.parent : null;
        this.x = this._target.x;
        this.y = this._target.y;
        if (this.parent === grandparent) {
            this.x += parent.x;
            this.y += parent.y;
        }
        if (this._animation.position === 0) {
            this.y -= this._target.height;
        } else if (this._animation.position === 1) {
            this.y -= this._target.height / 2;
        }
    }
};
Maybe try this instead? Put near top probably.


nope, got nothing, i even placed it before Yanfly core, nothing, i even tried with TPZH spaced, and it didnt work
I tried it myself and it worked on fog animation 35 set to center named fog TPZH
Fog.png


If it doesn't work probably another plugin, I tried with over 150 and edited the base script. If you have notepad++ open all plugins and search
Sprite_Animation.prototype.updatePosition = function() {
in all documents for something that overwrites it, I mean overwrite and not like
var animation_position = Sprite_Animation.prototype.updatePosition;
Sprite_Animation.prototype.updatePosition = function() {
I tried it myself and it worked on fog animation 35 set to center named fog TPZH
View attachment 134372

If it doesn't work probably another plugin, I tried with over 150 and edited the base script. If you have notepad++ open all plugins and search
Sprite_Animation.prototype.updatePosition = function() {
in all documents for something that overwrites it, I mean overwrite and not like
var animation_position = Sprite_Animation.prototype.updatePosition;
Sprite_Animation.prototype.updatePosition = function() {

Idk if i understand that, i'm pretty much illiterate when it comes to coding, so i'd rather not do something stupid and bug the hell outta my project... i figure its easy for me just to be a lot precise with trial and error to place it right

But thanks a lot for the help, man!

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-play-an-animation-behind-a-sv_actor-enemy.118279/