Battle sequence moving too fast. What does "slow down" mean in javascript

jjleroy

I love bananas
Veteran
Joined
Aug 5, 2017
Messages
184
Reaction score
34
First Language
German, English
Primarily Uses
RMMV
Good day dear RPGmakerfriends. I'm trying to make a cool RPG battle design namely the persona 5 battle design.
However, as you can see, things are moving way too fast.


I don't know about you but I think first of all, the enemy's HP Gauge should be visible longer. Unfortunately this can't be controlled by parameters in the plugin.

Second, the new turn starts too soon and the menu immediately pops up again even though the HP gauge is still going down.

Third, the "1 MORE!" animation is actually a common event activated by a switch, and does not stop the flow of the battle, but just runs parallel, which looks rushed and weird. Unfortunately it doesn't work if I set it to autoplay.

Now I tried to add

this._waitCount = 600;

into various places in the plugins, but nothing happened.
Now I wanted to ask. What would be the proper way to make the battle process slower?

EDIT: So what I tried now is to set a timeout before the HP gauge disappears.
But nothing happened. The HP gauge simply never disappeared...

Code:
//==============================
// * Update Fade
//==============================
HPGaugeSprite.prototype.updateFade = function() {
    if (this._slideA) {this._slideX += 2};
  
     setTimeout(function() {
         this.opacity = 0;
     }, 1000);
          
};
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
I'm not going to answer the first one, sincr I don't even know any details whatsoever about how your action sequences are built. Nevertheless, the code you provided would be quite easy:
Code:
setTimeout(function() {
         this.opacity = 0;
     }, 1000);
will never do anything. setTimeout, setInterval and xhr.on events are context losing methods. Meaning that 'this' actually refers to the highest level, in other words Window, regardless of where you define it. You may have some luck with
"var self = this;" and then refer to self.opacity instead of this.opacity, although in all honesty, I doubt it would work and that you'd have to call the gauges by variable names.
 

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

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top