Long long balloon icon script

Does anyone know how to manipulate showing time of balloon icons

For example, I want to show balloon icon for 5-10 second once activated the event. I have been trying with method setWaitMode, but does not work

$gameMap.event(X).requestBalloon(X)

Any suggestions

Thanks
or
Thanks I look at that but not what I am looking for

I looked at this function. It works when I call requestBalloon but does not work when I call setWaitMode.

Game_Interpreter.prototype.command213 = function() {
this._character = this.character(this._params[0]);
if (this._character) {
this._character.requestBalloon(this._params[1]);
if (this._params[2]) {
this.setWaitMode('balloon');
}
}
return true;
};

Does anyone know what does this line or params[2] mean ?

if (this._params[2]) {
this.setWaitMode('balloon');
}
Thanks I look at that but not what I am looking for

I looked at this function. It works when I call requestBalloon but does not work when I call setWaitMode.

Game_Interpreter.prototype.command213 = function() {
this._character = this.character(this._params[0]);
if (this._character) {
this._character.requestBalloon(this._params[1]);
if (this._params[2]) {
this.setWaitMode('balloon');
}
}
return true;
};

Does anyone know what does this line or params[2] mean ?

if (this._params[2]) {
this.setWaitMode('balloon');
}
It's the check box for wait for completion in editor. No matter what you need a plugin to extend the duration of the a balloon

Code:
Sprite_Balloon.prototype.frameIndex = function() {
    var index = (this._duration - this.waitTime()) / this.speed();
    return 7 - Math.max(Math.floor(index), 0);
};
You can edit this part of the code with whatever you want to get it to stay on a frame. Other 2 should be able to do what you want already though.
Thank you. I am trying to understand this code.

Do you know how Sprite_Balloon function relate to requestBalloon function/method ?

I cannot find the connection between these 2
Thank you. I am trying to understand this code.

Do you know how Sprite_Balloon function relate to requestBalloon function/method ?

I cannot find the connection between these 2

When you use that script call it is calling this.
Code:
Game_CharacterBase.prototype.requestBalloon = function(balloonId) {
    this._balloonId = balloonId;
};

On every frame for every character it updates.
Code:
Sprite_Character.prototype.update = function() {
    Sprite_Base.prototype.update.call(this);
    this.updateBitmap();
    this.updateFrame();
    this.updatePosition();
    this.updateAnimation();
    this.updateBalloon();
    this.updateOther();
};
In that update it updatesBalloon();

Code:
Sprite_Character.prototype.updateBalloon = function() {
    this.setupBalloon();
    if (this._balloonSprite) {
        this._balloonSprite.x = this.x;
        this._balloonSprite.y = this.y - this.height;
        if (!this._balloonSprite.isPlaying()) {
            this.endBalloon();
        }
    }
};
The first line is setupBalloon(); which checks if the balloonId is > 0, which is what the requestBalloon sets.
Code:
Sprite_Character.prototype.setupBalloon = function() {
    if (this._character.balloonId() > 0) {
        this.startBalloon();
        this._character.startBalloon();
    }
};
If true it starts, creating a new Sprite Balloon.
Code:
Sprite_Character.prototype.startBalloon = function() {
    if (!this._balloonSprite) {
        this._balloonSprite = new Sprite_Balloon();
    }
    this._balloonSprite.setup(this._character.balloonId());
    this.parent.addChild(this._balloonSprite);
};
You are correct. Look like I cannot plugin for this one.

Original thread: https://forums.rpgmakerweb.com/threads/long-long-balloon-icon-script.119489/