MZ 'Pictures Above' issues

I'm trying to get this plugin to function by showing an image above the battle interface. I've seen the plugin referenced a few places on this forum and no one seems to have any issues, but I can't tell what I'm doing wrong.


I'm using this event to set up the picture. When the add-on is off the picture does set up (but behind the battle interface). "BattleHUD" might not be the right constructor(?) but I don't know how to find the correct one. I would appreciate anyone who can confirm the plugin works and/or knows what the term I should be using is.

Thanks!

1768093316456.png
Just a quick guess: try replacing BattleHUD with Window_BattleStatus? 👋
Just a quick guess: try replacing BattleHUD with Window_BattleStatus? 👋
No luck.
Should this image appear above the log text?
Should this image appear above the log text?
What I really need is it to appear over the players characters on the bottom of the screen. It can appear over the log text and I can re-position as needed, but it isn't strictly necessary.
In this case, you can include this in the battle start rewrite function or in the common event that starts along with it:
Code:
var bitmap = ImageManager.loadPicture('ImageNameHere');
var sprite = new Sprite(bitmap);
sprite.move(0,32);
SceneManager._scene.addChild(sprite);

Source:
In this case, you can include this in the battle start rewrite function or in the common event that starts along with it:
Code:
var bitmap = ImageManager.loadPicture('ImageNameHere');
var sprite = new Sprite(bitmap);
sprite.move(0,32);
SceneManager._scene.addChild(sprite);

Source:

Works like a charm! Thanks so much!
just to let you know, if you want pictures above something that is made
from the plugin.

you need to open the plugin, for example, in SRDHUDMaker (MV)

JavaScript:
BattleHUD.prototype = Object.create(MapHUD.prototype);
BattleHUD.prototype.constructor = BattleHUD;

BattleHUD.prototype.updateActivity = function() {

here, the constructor you need = "BattleHUD"

JavaScript:
Sprite_HUDCursor.prototype = Object.create(Sprite.prototype);
Sprite_HUDCursor.prototype.constructor = Sprite_HUDCursor;

Sprite_HUDCursor.prototype.initialize = function() {

in the above, the name = "Sprite_HUDCursor".

whatever the name you need or target for the hud your plugin made,
or set, find this constructor and use that name.

than it place the picture above the sprites (if you want that this way).
Double post my bad
Sorry, I didn't understand. Have you been able to test the solutions yet? If you need any tips, feel free to comment.
Sorry, I didn't understand. Have you been able to test the solutions yet? If you need any tips, feel free to comment.
Oh you're paying close attention lol. Sorry for the bad etiquette.

In hindsight I should have asked: How do I remove the picture once it's on my screen?
If you are using the method I demonstrated, the image will be erased when you exit the battle.

Didn't you see the reference thread?

However, if you want to create another event that clears the Picture, you will first need to declare the sprite variable as global and preferably with a different name.

Please note that these are two separate event commands, just as a test to see the image being deleted after 2 second:
Code:
◆Script:var bitmap = ImageManager.loadPicture('HudBattle');
:      :window.hudsprite = new Sprite(bitmap);
:      :hudsprite.move(0,32);
:      :SceneManager._scene.addChild(hudsprite);
◆Wait:120 frames
◆Script:SceneManager._scene.removeChild(hudsprite);

Edit:
My advice is that creating a plugin to automate this is still the best solution for future modifications, instead of repeatedly calling the common event for each troop created.
If you are using the method I demonstrated, the image will be erased when you exit the battle.

Didn't you see the reference thread?

However, if you want to create another event that clears the Picture, you will first need to declare the sprite variable as global and preferably with a different name.

Please note that these are two separate event commands, just as a test to see the image being deleted after 2 second:
Code:
◆Script:var bitmap = ImageManager.loadPicture('HudBattle');
:      :window.hudsprite = new Sprite(bitmap);
:      :hudsprite.move(0,32);
:      :SceneManager._scene.addChild(hudsprite);
◆Wait:120 frames
◆Script:SceneManager._scene.removeChild(hudsprite);

Edit:
My advice is that creating a plugin to automate this is still the best solution for future modifications, instead of repeatedly calling the common event for each troop created.
Awesome thanks so much. I did see the reference thread but I couldn't figure out what variable was associated with the added image. I would have kept mucking around but then you replied to my half-finished question so I thought it would just be easier to ask. Judging from the solution I don't think I would have figured it out on my own anyways.

Appreciate all your help!
Anyway, sorry if it seemed confusing.
If it's resolved, report it to the moderator so they can lock it.

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/pictures-above-issues.181889/