MZ help understanding JS syntax.

Hi i have a problem and this has been a problem for me for a very long time. and every time i feel like im closer to the answer the the path dissapears and i find myself lost in a forest of scary looking JS trees blocking my way out or forward... sigh.

Say for instance you have the following,

JavaScript:
JavaScript:
this.bg = new Sprite(ImageManager.loadTitle1("V5"));
this.bg.x = 0;
this.bg.y = 0;
this.bg.width = Graphics.width / 12;
this.bg.height = Graphics.height / 12;
this.addChildAt(this.bg,1);


you need to create 40 of the following and using a for loop and you do exactly that.
the result is you end up with 40 of them, um 40 instances of it?
No problem right?

well my question is how exactly do you access the properties of the different instances since (im assuming) they're all accessed using;

this.bg
//eg
this.bg.x
//or
this.bg.height
//or even
this.bg.anchor
//etc

i think there is a way to do this its just that i can't figure it out. actually if anyone can give me any info to help with this id be super...um grateful.
eyeballing it from memory, by tying it to the same Python syntax.

this.getChildAt(1); => bg
since
this.addChildAt(this.bg,1);

and with that,
this.getChildAt(1).height => bg.height

same thing, in reverse.
Hi i have a problem and this has been a problem for me for a very long time. and every time i feel like im closer to the answer the the path dissapears and i find myself lost in a forest of scary looking JS trees blocking my way out or forward... sigh.

Say for instance you have the following,

JavaScript:
JavaScript:
this.bg = new Sprite(ImageManager.loadTitle1("V5"));
this.bg.x = 0;
this.bg.y = 0;
this.bg.width = Graphics.width / 12;
this.bg.height = Graphics.height / 12;
this.addChildAt(this.bg,1);


you need to create 40 of the following and using a for loop and you do exactly that.
the result is you end up with 40 of them, um 40 instances of it?
No problem right?

well my question is how exactly do you access the properties of the different instances since (im assuming) they're all accessed using;

this.bg
//eg
this.bg.x
//or
this.bg.height
//or even
this.bg.anchor
//etc

i think there is a way to do this its just that i can't figure it out. actually if anyone can give me any info to help with this id be super...um grateful.

Personally to make it all easier and know exactly what children I'm dealing with
I would first place them into a container...

Spoiler: Code from the rmmz_sprites.js that creates the picture sprites
1652080531827.png
Similar to how the pictures are setup, pictures are stored inside their own container called '_pictureContainer"

Sooo doing something like that code would be something like this...
Spoiler: Sprite Play - Test/Demo Plugin Code
JavaScript:
//=============================================================================
// RPG Maker MZ - CT_Bolt's Sprite Play
//=============================================================================
/*:
 * @target MZ
 * @plugindesc [RPG Maker MZ] [Tier 1] [Version 1.00] [CT_Bolt - Sprite Play]
 * @author CT_Bolt
 */
var CTB = CTB || {}; CTB.SpritePlay  = CTB.SpritePlay || {};
var Imported = Imported || {}; Imported["CTB_SpritePlay"] = 1.00;
(($_$) => {
    const NAMESPACE   = 'SpritePlay';
    const PLUGIN_NAME = 'CTB_' + NAMESPACE;
 
    // This is just an alias that will alias the "createUpperLayer" of the "Spriteset_Base" class object
    // Then calls the new function "createExtraSprites" to create the new sprites and their sprite container
    $_$['Spriteset_Base.prototype.createUpperLayer'] = Spriteset_Base.prototype.createUpperLayer;
    Spriteset_Base.prototype.createUpperLayer = function() {
        $_$['Spriteset_Base.prototype.createUpperLayer'].apply(this, arguments);
        this.createExtraSprites();
    };
 
    // New function to create 40 extra sprites inside of a new sprite container
    Spriteset_Base.prototype.createExtraSprites = function() {
        this._extraSpritesContainer = new Sprite();
        for (let i = 1; i <= 40; i++) {
            var sprite = new Sprite(ImageManager.loadTitle1("V5"));
            sprite.scale.x = .25;
            sprite.scale.y = .25;
            this._extraSpritesContainer.addChild(sprite);
        }
        this.addChild(this._extraSpritesContainer);
    };
})(CTB.SpritePlay, this);

Then with that type of setup to access any of the children of the "_extraSpriteContainer" you can do something like this...
Spoiler: Accessing the children from the container
JavaScript:
const spriteset = SceneManager._scene._spriteset;
const container = spriteset._extraSpritesContainer;
const maxChildren = container.children.length;
var randomIndex = Math.floor(Math.random() * maxChildren);
var sprite = container.getChildAt(randomIndex)
var maxX = Graphics.width - (sprite.width * sprite.scale.x);
var maxY = Graphics.width - (sprite.width * sprite.scale.x);
sprite.x = Math.floor(Math.random() * maxX);
sprite.y = Math.floor(Math.random() * maxY);
Index will still start at 0 since the container of children is actually just an array
That will get a random sprite from the container then set it's x & y to a random spot on the screen 🙂

Results could then become something like this...
Spoiler: Demo Example Video


That help get any idea of how to do what you need?
well my question is how exactly do you access the properties of the different instances since (im assuming) they're all accessed using;
I think the problem you're having is that it feels like an Array or List (which is the same in JS), but it's not a list (at least, it's not visible).

You are asking about the syntax, which usually is:

Add an item to a list
Code:
children.push(item)

Get an item from the list
Code:
children[x]
whereas x is an index; it could be i

As you can see in your code, there's no "push" method, and there's no (visible) list, and that might confuse you a little bit. So your question actually is not about the syntax, but more like "how is the method called to get an item from THIS specific object?". According to this link https://kinoar.github.io/rmmv-doc-web/classes/sprite.html#getchildat it's

Code:
this.getChildAt(i)
eyeballing it from memory, by tying it to the same Python syntax.

this.getChildAt(1); => bg
since
this.addChildAt(this.bg,1);

and with that,
this.getChildAt(1).height => bg.height

same thing, in reverse.

dude I love you so much!!! I remember I used to do something like this in vxace and I remember now that the api for rpgmaker is usually made as similar to the previous ones as possible . and I don't even know why I didn't try this.
lol I'm so dumb! Anyway thank you!~

Personally to make it all easier and know exactly what children I'm dealing with
I would first place them into a container...

Spoiler: Code from the rmmz_sprites.js that creates the picture sprites
Similar to how the pictures are setup, pictures are stored inside their own container called '_pictureContainer"

Sooo doing something like that code would be something like this...
Spoiler: Sprite Play - Test/Demo Plugin Code
JavaScript:
//=============================================================================
// RPG Maker MZ - CT_Bolt's Sprite Play
//=============================================================================
/*:
 * @target MZ
 * @plugindesc [RPG Maker MZ] [Tier 1] [Version 1.00] [CT_Bolt - Sprite Play]
 * @author CT_Bolt
 */
var CTB = CTB || {}; CTB.SpritePlay  = CTB.SpritePlay || {};
var Imported = Imported || {}; Imported["CTB_SpritePlay"] = 1.00;
(($_$) => {
    const NAMESPACE   = 'SpritePlay';
    const PLUGIN_NAME = 'CTB_' + NAMESPACE;
 
    // This is just an alias that will alias the "createUpperLayer" of the "Spriteset_Base" class object
    // Then calls the new function "createExtraSprites" to create the new sprites and their sprite container
    $_$['Spriteset_Base.prototype.createUpperLayer'] = Spriteset_Base.prototype.createUpperLayer;
    Spriteset_Base.prototype.createUpperLayer = function() {
        $_$['Spriteset_Base.prototype.createUpperLayer'].apply(this, arguments);
        this.createExtraSprites();
    };
 
    // New function to create 40 extra sprites inside of a new sprite container
    Spriteset_Base.prototype.createExtraSprites = function() {
        this._extraSpritesContainer = new Sprite();
        for (let i = 1; i <= 40; i++) {
            var sprite = new Sprite(ImageManager.loadTitle1("V5"));
            sprite.scale.x = .25;
            sprite.scale.y = .25;
            this._extraSpritesContainer.addChild(sprite);
        }
        this.addChild(this._extraSpritesContainer);
    };
})(CTB.SpritePlay, this);

Then with that type of setup to access any of the children of the "_extraSpriteContainer" you can do something like this...
Spoiler: Accessing the children from the container
JavaScript:
const spriteset = SceneManager._scene._spriteset;
const container = spriteset._extraSpritesContainer;
const maxChildren = container.children.length;
var randomIndex = Math.floor(Math.random() * maxChildren);
var sprite = container.getChildAt(randomIndex)
var maxX = Graphics.width - (sprite.width * sprite.scale.x);
var maxY = Graphics.width - (sprite.width * sprite.scale.x);
sprite.x = Math.floor(Math.random() * maxX);
sprite.y = Math.floor(Math.random() * maxY);
Index will still start at 0 since the container of children is actually just an array
That will get a random sprite from the container then set it's x & y to a random spot on the screen 🙂

Results could then become something like this...
Spoiler: Demo Example Video


That help get any idea of how to do what you need?


dude this is really useful like damn I could use this thanks man this helps a ton.

I think the problem you're having is that it feels like an Array or List (which is the same in JS), but it's not a list (at least, it's not visible).

You are asking about the syntax, which usually is:

Add an item to a list
Code:
children.push(item)

Get an item from the list
Code:
children[x]
whereas x is an index; it could be i

As you can see in your code, there's no "push" method, and there's no (visible) list, and that might confuse you a little bit. So your question actually is not about the syntax, but more like "how is the method called to get an item from THIS specific object?". According to this link https://kinoar.github.io/rmmv-doc-web/classes/sprite.html#getchildat it's

Code:
this.getChildAt(i)
oooo thanks. really helps break a persistent and scary looking that wall that was causing me to doubt myself this really helps that's a lot.

what i used in the end was this;
Code:
this.__$item.setFrame($infomisc._clipsize ,0,$infomisc._step,$infomisc._step2); //x,y,w,h
this.getChildAt(6).setFrame($infomisc._clipsize ,0,$infomisc._step,$infomisc._step2); //this to access the other instance that was created by my array.

I'm able to move one thanks to you guys, thanks so much! I'm looking forward to receiving more advice from you in the future!!~~
So Im thinking you're also being thrown off by this.

this
is something that can be perplexing for those no used to JS's way of doing OO programming. It was one of the first things I focused hard on because without understanding it, you can't understand anything else in JS. this is an important part of the language, as you can see it's all over the place.

this is pointing to the object and you can also find out what that is through a console.log("text here", this) call and it will tell you what the object for this is. From there you can store that object and have access to all the properties associated with it. (I believe it's best to do that inside a function's scope).

Easiest example..

Game_Actor.prototype.getHp = function() {
return this._hp;
};
this will point to the actor that the method was called on it and return its current HP. (obviously this isn't necessary but this was the easiest way to explain it)

this is also more involved than that

....and just got a weird feeling of deja'vu.
So Im thinking you're also being thrown off by this.

this
is something that can be perplexing for those no used to JS's way of doing OO programming. It was one of the first things I focused hard on because without understanding it, you can't understand anything else in JS. this is an important part of the language, as you can see it's all over the place.

this is pointing to the object and you can also find out what that is through a console.log("text here", this) call and it will tell you what the object for this is. From there you can store that object and have access to all the properties associated with it. (I believe it's best to do that inside a function's scope).

Easiest example..

Game_Actor.prototype.getHp = function() {
return this._hp;
};
this will point to the actor that the method was called on it and return its current HP. (obviously this isn't necessary but this was the easiest way to explain it)

this is also more involved than that

....and just got a weird feeling of deja'vu.
The best way I can think of to explain it is that "this" is a keyword pointing to the object which invoked the block currently being executed (which is why, for example, if you have a forEach loop inside a function which also has "this" inside it, the keyword inside the forEach block will refer to whatever object the iteration variable is holding, rather than the original calling object, unless you explicitly provide the original one as the thisArg argument to the forEach function)
So Im thinking you're also being thrown off by this.

this
is something that can be perplexing for those no used to JS's way of doing OO programming. It was one of the first things I focused hard on because without understanding it, you can't understand anything else in JS. this is an important part of the language, as you can see it's all over the place.

this is pointing to the object and you can also find out what that is through a console.log("text here", this) call and it will tell you what the object for this is. From there you can store that object and have access to all the properties associated with it. (I believe it's best to do that inside a function's scope).

Easiest example..

Game_Actor.prototype.getHp = function() {
return this._hp;
};
this will point to the actor that the method was called on it and return its current HP. (obviously this isn't necessary but this was the easiest way to explain it)

this is also more involved than that

....and just got a weird feeling of deja'vu.
The best way I can think of to explain it is that "this" is a keyword pointing to the object which invoked the block currently being executed (which is why, for example, if you have a forEach loop inside a function which also has "this" inside it, the keyword inside the forEach block will refer to whatever object the iteration variable is holding, rather than the original calling object, unless you explicitly provide the original one as the thisArg argument to the forEach function)
alright. thanks for the info. just to check to see if I'm fully understanding,(because I'm also not sure if I do understand it fully and I would actually really love to have a fuller understanding) ill do a small script with um, how I currently use and understand the intricacies of js - OOP , specially objects and stuffs cause that's my biggest weak point rn. id love if you both could um look it over and let me know if there's anything I missed or could have done better. Thanks~~!
OOPS sorry MODS!! i forgot~


Code:
//=============================================================================
// RPG Maker MZ - Just something different i guess?
//=============================================================================

/*:
 * @target MZ
 * @plugindesc  \(٥⁀▽⁀ )/ hallo~~~
 * @author Ougitou~
 *
 * @help infinityBlink.js
 *
 * Hello, how are you?
 *good?
 *Yay !! ~
 *This is for you!~~
 *
 * Unfortunatly this does not provide plugin commands.
 */

/*:ja
 * @target MZ
 * @plugindesc \(٥⁀▽⁀ )/ hallo~~~
 * @author Ougitou~
 *
 * @help infinityBlink.js
 *
 * こんにちは、お元気ですか?
 *良い?
 *イェーイ!!〜
 *これは私があなたのためだけに作成したものです!楽しんでください!~~
 *
 *pooña~ Enjoy~
 *
 */


//Variables?----------------------------------------------------
var $OUGI_Bin = {
        a : "Beach", b : "Bigtree", c : "Canyon", d : "Flyingisland", e : "Gate",
        f : "Gold", g : "Jungle",  h : "Mansion",  i : "Monument",  j : "Mountain",
        k : "Night",  l : "Oasis",  m : "Ruins",  n : "Sky",  o : "Snow",
        seconds_time : 0,
        tempura : 0
         }

var cbg;
var _u;
var dgt;
//--------------------------------------------------------------


(() => {
   
    Scene_Title.prototype.create = function() {
    Scene_Base.prototype.create.call(this);

    this.createBackground();
    this.createForeground();
    this.createWindowLayer();
    this.createCommandWindow();

    //------------------------------------------------------------------------
    //i would make a function for this so its cleaner but im a dirty bish lol
    this.removeChild(this._backSprite1);
    this.removeChild(this._backSprite2);
    //------------------------------------------------------------------------
};

cbg = Scene_Title.prototype.createBackground;
Scene_Title.prototype.createBackground = function() {
    cbg.call(this);

    var objkt_element_name = Object.keys($OUGI_Bin)[$OUGI_Bin.seconds_time];
    this._BG = new Sprite(ImageManager.loadTitle1($OUGI_Bin[objkt_element_name]));
    this.addChildAt(this._BG,1);
    //alert($OUGI_Bin[objkt_element_name]); //<----

    //-----------------------------------------------------------------------------
    //here too because it creates the original bg every time the function is called
    this.removeChild(this._backSprite1);
    this.removeChild(this._backSprite2);
    //-----------------------------------------------------------------------------
 
};

_u = Scene_Title.prototype.update;
Scene_Title.prototype.update = function() {
    Scene_Base.prototype.update.call(this);
    _u.call(this);
    this.valueup();
};

Scene_Title.prototype.valueup = function(){
    this._BG.opacity = $OUGI_Bin.tempura;
   
    if($OUGI_Bin.tempura <= 290)
    {
     $OUGI_Bin.tempura += 1;
     //---------------------
     this.drawGameTitle();
    }

    if($OUGI_Bin.tempura >= 290) //reset
    {
       $OUGI_Bin.tempura = 0;
       $OUGI_Bin.seconds_time += 1;
       //-----------------------------
       this.removeChild(this._BG);
       this.createBackground();
    }

    if($OUGI_Bin.seconds_time >= Object.keys($OUGI_Bin).length - 2)
    {
        $OUGI_Bin.seconds_time = 0; // reset if this makeshift counter is
        $OUGI_Bin.tempura = 0;      // greater that the array returned
        //------------------------     // from the object ougi_bin.
        this.removeChild(this._BG);
        this.createBackground();  
    }
};


})();

@Trihan
@Arctica
@Aerosys
@ct_bolt
@gstv87

proof check please and let me know if i did anything incorrectly. that being the case it should run simply by placing it in plugins and um enabling it?
I can't specifically see anything I would consider incorrect syntax, but it's also very confusing what you're trying to do here and why, and there are several things you've done in ways that are not how I think I would have done them. The code itself shouldn't present any errors, at least.
hmmm explain please~
I can't specifically see anything I would consider incorrect syntax, but it's also very confusing what you're trying to do here and why, and there are several things you've done in ways that are not how I think I would have done them. The code itself shouldn't present any errors, at least.

well I know there are ways to get the names of the files without actually putting them there but I'm not sure how to at the moment. but I needed an object with lots of elements so I did that and also it was useful to show how how I used an object and got the index of each of the elements. hmmmm then used that to get the values so that the code could run properly. Also i do feel proud of myself I wasn't really aware of how to use the key thing but I did and I couldnt stop smiling afterwards I'm just SOOO happy and its all thanks to you~ o it just cycles through the images on the title screen in a kind of fady way lol. and a lot of the stuff are done in over the top ways as to iterate my understanding etc. i feel like i should have explained more.
wu~
Yeah all works as it should 🙂 Congrats on what you've done so far.

..definitely not quite how I would have done it but yep works and cycles through the list of title backgrounds with a nice fade in effect.

That said...
...personally this is an example of something closer to like I might have done...
Spoiler
JavaScript:
//=============================================================================
// RPG Maker MZ - CT_Bolt's Title Screen Extension
//=============================================================================
/*:
 * @target MZ
 * @plugindesc [RPG Maker MZ] [Tier 1] [Version 0.60] [CT_Bolt - Title Screen Extension]
 * @author CT_Bolt
 * @url https://ct-bolt.itch.io/
 *
 * @help CTB_TitleScreenExtensionMZ.js
 *
 * This plugin provides extra Title Screen features as detailed below
 */
 
var CTB = CTB || {}; CTB.TitleScreenExtension  = CTB.TitleScreenExtension || {};
var Imported = Imported || {}; Imported["CTB_TitleScreenExtension"] = 0.60;

(($_$) => {
    const NAMESPACE   = 'TitleScreenExtension';
    const PLUGIN_NAME = 'CTB_' + NAMESPACE;
   
    // Main Settings Object   
    $_$.settings = {files: ["Beach", "Bigtree", "Canyon", "Flyingisland", "Gate",
                            "Gold", "Jungle", "Mansion", "Monument", "Mountain",
                            "Night", "Oasis", "Ruins", "Sky", "Snow"],
                     fileIndex: 0,
                     count: 0,
                     maxCount: 290,
                     fadeOut: false
    };

    // Overwrite
    Scene_Title.prototype.create = function() {
        Scene_Base.prototype.create.call(this);
        this.createBackground();
        this.createForeground();
        this.createWindowLayer();
        this.createCommandWindow();
        this.removeDefaultSprites();
    };
   
    // New
    Scene_Title.prototype.removeDefaultSprites = function() {
        this.removeChild(this._backSprite1);
        this.removeChild(this._backSprite2);
    };

    // Alias
    $_$['Scene_Title.prototype.createBackground'] = Scene_Title.prototype.createBackground;
    Scene_Title.prototype.createBackground = function() {
        $_$['Scene_Title.prototype.createBackground'].apply(this, arguments);

        var objkt_element_name = $_$.settings.files[$_$.settings.fileIndex];
        this._BG = new Sprite(ImageManager.loadTitle1(objkt_element_name));
        this.addChildAt(this._BG,1);

        this.removeDefaultSprites();    
    };

    // Alias
    $_$['Scene_Title.prototype.update'] = Scene_Title.prototype.update;
    Scene_Title.prototype.update = function() {
        Scene_Base.prototype.update.call(this);
        $_$['Scene_Title.prototype.update'].apply(this, arguments);
        this.changeValue();
    };
   
    // New -- Will soon add a way to fade out
    Scene_Title.prototype.changeValue = function(){
        if ($_$.settings.fadeOut){
            this.valueDown();
        }else{
            this.valueUp();
        };
    };
   
    // New
    Scene_Title.prototype.valueUp = function(){
        this._BG.opacity = $_$.settings.count;
      
        if($_$.settings.count <= $_$.settings.maxCount)
        {
         $_$.settings.count += 1;
         this.drawGameTitle();
        }

        if($_$.settings.count >= $_$.settings.maxCount) //reset
        {
           $_$.settings.count = 0;
           $_$.settings.fadeOut=true;
        }
    };
   
    Scene_Title.prototype.valueDown = function(){
        this._BG.opacity = 255-$_$.settings.count;
       
        if($_$.settings.count <= $_$.settings.maxCount)
        {
         $_$.settings.count += 1;
         this.drawGameTitle();
        }

        if($_$.settings.count >= $_$.settings.maxCount) //reset
        {
            $_$.settings.count = 0;
            $_$.settings.fileIndex += 1;
            if($_$.settings.fileIndex > $_$.settings.files.length - 1)
            {
                $_$.settings.fileIndex = 0;
            }
            $_$.settings.fadeOut=false;
            this.removeChild(this._BG);
            this.createBackground();
        }
    };
})(CTB.TitleScreenExtension, this);

One of the most note-able differences I would say would be as you can see I just added an array of filenames to the object instead 😉
I also added a fadeout so that it doesn't just cut to the next image 😉
Yeah all works as it should 🙂 Congrats on what you've done so far.

..definitely not quite how I would have done it but yep works and cycles through the list of title backgrounds with a nice fade in effect.

That said...
...personally this is an example of something closer to like I might have done...
Spoiler
JavaScript:
//=============================================================================
// RPG Maker MZ - CT_Bolt's Title Screen Extension
//=============================================================================
/*:
 * @target MZ
 * @plugindesc [RPG Maker MZ] [Tier 1] [Version 0.60] [CT_Bolt - Title Screen Extension]
 * @author CT_Bolt
 * @url https://ct-bolt.itch.io/
 *
 * @help CTB_TitleScreenExtensionMZ.js
 *
 * This plugin provides extra Title Screen features as detailed below
 */
 
var CTB = CTB || {}; CTB.TitleScreenExtension  = CTB.TitleScreenExtension || {};
var Imported = Imported || {}; Imported["CTB_TitleScreenExtension"] = 0.60;

(($_$) => {
    const NAMESPACE   = 'TitleScreenExtension';
    const PLUGIN_NAME = 'CTB_' + NAMESPACE;
  
    // Main Settings Object  
    $_$.settings = {files: ["Beach", "Bigtree", "Canyon", "Flyingisland", "Gate",
                            "Gold", "Jungle", "Mansion", "Monument", "Mountain",
                            "Night", "Oasis", "Ruins", "Sky", "Snow"],
                     fileIndex: 0,
                     count: 0,
                     maxCount: 290,
                     fadeOut: false
    };

    // Overwrite
    Scene_Title.prototype.create = function() {
        Scene_Base.prototype.create.call(this);
        this.createBackground();
        this.createForeground();
        this.createWindowLayer();
        this.createCommandWindow();
        this.removeDefaultSprites();
    };
  
    // New
    Scene_Title.prototype.removeDefaultSprites = function() {
        this.removeChild(this._backSprite1);
        this.removeChild(this._backSprite2);
    };

    // Alias
    $_$['Scene_Title.prototype.createBackground'] = Scene_Title.prototype.createBackground;
    Scene_Title.prototype.createBackground = function() {
        $_$['Scene_Title.prototype.createBackground'].apply(this, arguments);

        var objkt_element_name = $_$.settings.files[$_$.settings.fileIndex];
        this._BG = new Sprite(ImageManager.loadTitle1(objkt_element_name));
        this.addChildAt(this._BG,1);

        this.removeDefaultSprites();   
    };

    // Alias
    $_$['Scene_Title.prototype.update'] = Scene_Title.prototype.update;
    Scene_Title.prototype.update = function() {
        Scene_Base.prototype.update.call(this);
        $_$['Scene_Title.prototype.update'].apply(this, arguments);
        this.changeValue();
    };
  
    // New -- Will soon add a way to fade out
    Scene_Title.prototype.changeValue = function(){
        if ($_$.settings.fadeOut){
            this.valueDown();
        }else{
            this.valueUp();
        };
    };
  
    // New
    Scene_Title.prototype.valueUp = function(){
        this._BG.opacity = $_$.settings.count;
     
        if($_$.settings.count <= $_$.settings.maxCount)
        {
         $_$.settings.count += 1;
         this.drawGameTitle();
        }

        if($_$.settings.count >= $_$.settings.maxCount) //reset
        {
           $_$.settings.count = 0;
           $_$.settings.fadeOut=true;
        }
    };
  
    Scene_Title.prototype.valueDown = function(){
        this._BG.opacity = 255-$_$.settings.count;
      
        if($_$.settings.count <= $_$.settings.maxCount)
        {
         $_$.settings.count += 1;
         this.drawGameTitle();
        }

        if($_$.settings.count >= $_$.settings.maxCount) //reset
        {
            $_$.settings.count = 0;
            $_$.settings.fileIndex += 1;
            if($_$.settings.fileIndex > $_$.settings.files.length - 1)
            {
                $_$.settings.fileIndex = 0;
            }
            $_$.settings.fadeOut=false;
            this.removeChild(this._BG);
            this.createBackground();
        }
    };
})(CTB.TitleScreenExtension, this);

One of the most note-able differences I would say would be as you can see I just added an array of filenames to the object instead 😉
I also added a fadeout so that it doesn't just cut to the next image 😉
wow yours is so much better!! I'm Jealous. lol you're so cool!!
wow yours is so much better!! I'm Jealous. lol you're so cool!!

lol bahahahahahaha! awww thanks 😍

Hey you're getting there though, seeking out more knowledge is always a good thing. ☺️
So you're definitely on the right track 😉 👍

but now I probably will release a customizable plugin for title screen soon just because lol
...since I'm already tinkering with it now :popcorn:
lol bahahahahahaha! awww thanks 😍

Hey you're getting there though, seeking out more knowledge is always a good thing. ☺️
So you're definitely on the right track 😉 👍

but now I probably will release a customizable plugin for title screen soon just because lol
...since I'm already tinkering with it now :popcorn:
oooo i'll be looking forward to it then~
(⁄ ⁄>⁄ ▽ ⁄<⁄ ⁄)
😍

Original thread: https://forums.rpgmakerweb.com/threads/help-understanding-js-syntax.147435/