Long long balloon icon script

Charles2020

Villager
Member
Joined
Feb 24, 2020
Messages
15
Reaction score
0
First Language
English
Primarily Uses
RMMV
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
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
104
First Language
English
Primarily Uses
RMMV

Charles2020

Villager
Member
Joined
Feb 24, 2020
Messages
15
Reaction score
0
First Language
English
Primarily Uses
RMMV
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');
}
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
104
First Language
English
Primarily Uses
RMMV
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.
 

Charles2020

Villager
Member
Joined
Feb 24, 2020
Messages
15
Reaction score
0
First Language
English
Primarily Uses
RMMV
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
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
104
First Language
English
Primarily Uses
RMMV
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);
};
 

Charles2020

Villager
Member
Joined
Feb 24, 2020
Messages
15
Reaction score
0
First Language
English
Primarily Uses
RMMV
You are correct. Look like I cannot plugin for this one.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

It's weird I actually have MORE work to do when stuck at home than before.
The No Travel Game Jam is here! Jump in to make a game in the month of April that takes place all in one town!


Decided to take a stab at video editing.... Even made a clickbait screen. I'm so proud of my sellout ways. :LZSexcite:

Forum statistics

Threads
95,470
Messages
929,395
Members
125,712
Latest member
Flane
Top