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

matgraz

Veteran
Veteran
Joined
Feb 4, 2018
Messages
65
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
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?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
102
First Language
English
Primarily Uses
RMMV
 

matgraz

Veteran
Veteran
Joined
Feb 4, 2018
Messages
65
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
I've just tried but it didnt work, i figure its some kind of conflict with that plugin that controls sprite plugin?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
102
First Language
English
Primarily Uses
RMMV
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.
 

matgraz

Veteran
Veteran
Joined
Feb 4, 2018
Messages
65
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
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
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
102
First Language
English
Primarily Uses
RMMV
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() {
 

matgraz

Veteran
Veteran
Joined
Feb 4, 2018
Messages
65
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Okay, that's the best I can do. Looks a little strange but..err.. it's my style, yeah, very original style..
being an extreme introvert with massive anxiety... I forget this is really, REALLY frustrating for people who are the exact opposite. still, wait this out and stay home...
I hope you all are keeping safe. <3 If you need a shoulder or an ear, I have two of both and am more than willing to listen & support you! Times are weird.
My dad, super frustrated by seclusion, asking me how I live like this. I shrug. "It helps to not like what is outside."
Apparently it's not just people who are hit by corona virus. My phone has set itself to English language on its own. Not that I'm complaining... :D

Forum statistics

Threads
95,443
Messages
929,187
Members
125,685
Latest member
imnotanepicgamer
Top