Introduction
These are just some modifications in the original script.
Features
Remove the auto created (100 default) image objects, and create the image objects dynamically, and when the "erase Picture" is called, it also erase the object.
This doesn't create a object with empty values, it only relocate space for the used images.
So, even if you use, "$gameScreen.showPicture(9999999,"Image_Name", 0, x, y, 100, 100, 255, 0);" it will not make the variable size 9999999.
How to Use
Just save the script as a .js file and add it to your project.
Plugin Commands / Script Calls
The same from original.
As the engine has a limite of 100 when calling throug "Show Picture", use "$gameScreen.showPicture" function.
Example:
JavaScript:
$gameScreen.showPicture(
id, name, origin, x, y, scaleX, scaleY, opacity, blendMode);
//Like
$gameScreen.showPicture(9999999,"Image_Name", 0, x, y, 100, 100, 255, 0);
if(ImageController._pictureContainer.children.find(picture => picture._pictureId == realPictureId) == undefined) {//Added line to check if the picture already exist
ImageController._pictureContainer.addChild(new Sprite_Picture(realPictureId)) //Added line to create the picture object and add it to the container
const picture = new Game_Picture();
picture.show(name, origin, x, y, scaleX, scaleY, opacity, blendMode);