MZ Animation z frame above pictures/SRD hud maker pro

I use a front view battle system with SRD hud maker pro and anything that is in the hud will be placed above the animations which is not the desired result and causes any animation directly placed on the hud to not show at all except for the flashes.

So far all l found for this problem is a small script for MV but dont seem to have any effect with MZ when changing the numbers around.

var animation_position = Sprite_Animation.prototype.updatePosition;
Sprite_Animation.prototype.updatePosition = function() {
animation_position.call(this)
if (this._animation.name.contains("TPZH")) {
this.z = 8;
} else {
this.z = -1;
}
};

Any help to fix my problem would be appreciated.
3 days
3 days
Hi there!

The SRD plugin, add the HUDs above the Spriteset(Scene map and scene battle):
Spoiler
1646451878088.png


1646451823211.png

The Spriteset holds the base sprite, which holds the tilemap, which is the effect container, which receives the MZ animations as children.

1646451677907.png


So if you want to put the HUD below MZ Animations, I THINK you need to add it into the tilemap as a child.

So try to modify the above functions from SRD, on both Scene Map and Scene Battle, changing the line:
this.addChild(this._ultraHudContainer)
to this
this._spriteset._tilemap.addChild(this._ultraHudContainer)

See if it will work.
And honestly, I didn't test it myself, don't know if it will break anything.
If it does, send the log and maybe we can figure this out.

NOTE1: I used the SRD_HUDMakerUltra.js (free version: 1.1.5)
this is the error l got by replacing both on the HUDMakerultra.js right at the battle start(no animations needed to crash)

chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/rmmz_managers.js:2030 TypeError: Cannot read property 'addChild' of undefined
at Scene_Battle.createUltraHUD (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/plugins/SRD_HUDMakerUltra.js:2023)
at Scene_Battle.createSpriteset (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/plugins/SRD_HUDMakerUltra.js:2017)
at Scene_Battle.<computed>.<computed> [as createSpriteset] (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/plugins/VisuMZ_0_CoreEngine.js:7690)
at Scene_Battle.createDisplayObjects (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/rmmz_scenes.js:3114)
at Scene_Battle.create (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/rmmz_scenes.js:2950)
at Function.SceneManager.changeScene (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/rmmz_managers.js:2084)
at Function.SceneManager.updateMain (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/rmmz_managers.js:2056)
at Function.SceneManager.update (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/rmmz_managers.js:1938)
at Function.Graphics._onTick (rmmz_core.js:811)
at TickerListener.emit (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/libs/pixi.js:9474)

1646453401042.png
Ops, my bad.
On the Scene_Battle code, use that instead:

this._battleField.addChild(this._ultraHudContainer)
this is the new error, editing on both map and battle scene with this._battleField.addChild(this._ultraHudContainer) at the same spot


1646454240061.png
Gosh, my bad again, it's really late here. But I think I know:

On the Scene Map, you didn't have to change. So put that on Scene Map:

this._spriteset._tilemap.addChild(this._ultraHudContainer)

On Scene Battle, put this:

this._spriteset._battleField.addChild(this._ultraHudContainer)
Works perfectly, thanks a ton. let me know if you need anything in exchange of your time.

this is solved
Works perfectly, thanks a ton. let me know if you need anything in exchange of your time.

this is solved
Not at all! It's fine!

Have fun!! 😀

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/animation-z-frame-above-pictures-srd-hud-maker-pro.145247/