Mog_CollapseEffects - How to speed up animation?

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
194
Reaction score
47
First Language
english
Primarily Uses
N/A
I'm using this script which allows an animation to play when the enemies die, in this case, I am using the shatter effect where they disappear like Thanos snapping his fingers.

The problem is the animation is like, 3-5 seconds long every time an enemy dies. Is there a part in the script where I can change it to simply speed up the animation?
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,891
Reaction score
623
First Language
Dutch
Primarily Uses
RMMV
if you check the master dmg and go to the shatter effect, you can see how to do them
in how many frames.

I dont know if you can use those setting inside the battle.

in case this is hardcoded in the plugin (and no params) you can adjust the speed in
the plugin itself. (this will also effect how you do the plugin commands outside battle.
 

minnty200

Veteran
Veteran
Joined
May 2, 2020
Messages
52
Reaction score
18
First Language
eng
Primarily Uses
RMMV
Are you using effect "0" or effect "1" for collapse effect?
 

minnty200

Veteran
Veteran
Joined
May 2, 2020
Messages
52
Reaction score
18
First Language
eng
Primarily Uses
RMMV
Theres a part in the script you can modify to change the speed of the "Shattered Pixels" In this part of the code....

Code:
//==============================
// * setup Coll Shatter Point
//==============================
Sprite_Battler.prototype.setupColShatterPoint = function() {     
     this._spriteCol = [];
     this._shatterDCol = String(Moghunter.collShatterDirection) == "Left" ? 0 : 1;
     var w = this.isEnemyP() ? this.bitmap.width / 4 : this.width;
     var fz = 32;
     var x2 = this.isEnemyP() ?  w * 3 : 0;
     var frag_size = Math.floor((this.height + w) / 40);
     var xi = Math.floor(-w / 2) + Math.floor(frag_size / 2);
     var yi = Math.floor(-this.height + frag_size);
     var f = 0
     for (var i = 0; i >= 0; i++) {
         this._spriteCol[i] = new Sprite(this.bitmap);
         this.setColSpritePar(this._spriteCol[i]);
         this._spriteCol[i].sx = (Math.random() * 0.5) + 1
         this._spriteCol[i].op = (Math.random() * 2) + 2.5;
         var x = Math.floor(i % fz) * frag_size
         var y = Math.floor(i / fz) * frag_size;
         this._spriteCol[i].x = xi + x;
         this._spriteCol[i].y = yi + y;
         this._spriteCol[i].setFrame(x + x2,y,frag_size,frag_size);
         this.addChild(this._spriteCol[i]);
         if (this._spriteCol[i].y > 0) {break};     
     };
};
The line: this._spriteCol.sx = (Math.random() * 0.5) + 1 is essentially the speed of which the pixels move at(I guess?) You can change the orange value to a greater number to the speed you wish. For example this._spriteCol.sx = (Math.random() * 4) + 1 would produce a much movement effect.
 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
194
Reaction score
47
First Language
english
Primarily Uses
N/A
Theres a part in the script you can modify to change the speed of the "Shattered Pixels" In this part of the code....

Code:
//==============================
// * setup Coll Shatter Point
//==============================
Sprite_Battler.prototype.setupColShatterPoint = function() {    
     this._spriteCol = [];
     this._shatterDCol = String(Moghunter.collShatterDirection) == "Left" ? 0 : 1;
     var w = this.isEnemyP() ? this.bitmap.width / 4 : this.width;
     var fz = 32;
     var x2 = this.isEnemyP() ?  w * 3 : 0;
     var frag_size = Math.floor((this.height + w) / 40);
     var xi = Math.floor(-w / 2) + Math.floor(frag_size / 2);
     var yi = Math.floor(-this.height + frag_size);
     var f = 0
     for (var i = 0; i >= 0; i++) {
         this._spriteCol[i] = new Sprite(this.bitmap);
         this.setColSpritePar(this._spriteCol[i]);
         this._spriteCol[i].sx = (Math.random() * 0.5) + 1
         this._spriteCol[i].op = (Math.random() * 2) + 2.5;
         var x = Math.floor(i % fz) * frag_size
         var y = Math.floor(i / fz) * frag_size;
         this._spriteCol[i].x = xi + x;
         this._spriteCol[i].y = yi + y;
         this._spriteCol[i].setFrame(x + x2,y,frag_size,frag_size);
         this.addChild(this._spriteCol[i]);
         if (this._spriteCol[i].y > 0) {break};    
     };
};
The line: this._spriteCol.sx = (Math.random() * 0.5) + 1 is essentially the speed of which the pixels move at(I guess?) You can change the orange value to a greater number to the speed you wish. For example this._spriteCol.sx = (Math.random() * 4) + 1 would produce a much movement effect.
Well it certainly makes the pixels go faster but now there's about a 2 second pause of nothing happening after the monster is dead :/
 

minnty200

Veteran
Veteran
Joined
May 2, 2020
Messages
52
Reaction score
18
First Language
eng
Primarily Uses
RMMV
There's a line "somewhere" in the script that says (I think) this._effectDuration = 400 I think you can play with that number to tone down the duration/wait time , it might mess up the other collapse effect though if they take up 400 framez. (Also im on my phone so i can't really reference the script right now!) X_X
 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
194
Reaction score
47
First Language
english
Primarily Uses
N/A
There's a line "somewhere" in the script that says (I think) this._effectDuration = 400 I think you can play with that number to tone down the duration/wait time , it might mess up the other collapse effect though if they take up 400 framez. (Also im on my phone so i can't really reference the script right now!) X_X
Yes, I already tried that and If I change it to say, 200, then it just freezes the animation halfway and I'm left with the monster graphic only have disappeared
 

minnty200

Veteran
Veteran
Joined
May 2, 2020
Messages
52
Reaction score
18
First Language
eng
Primarily Uses
RMMV
Yes, I already tried that and If I change it to say, 200, then it just freezes the animation halfway and I'm left with the monster graphic only have disappeared
Darn... I really thought the combination of both tweaking the duration and speed of the pixels would solve it! :(
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Newest RPG Maker drops: hey fellas, get on the MZ train to somewhere

Me: Building my VX Ace lego tower, blissfully unaware of time moving forward
When you are trying to make progress in your game. But something is stopping your motivation. Like come on mind! Let me do what I want! :<
Tfw everyone is trying their hardest to brainstorm about unique ideas and game mechanics, here I am just going: "How am I gonna event conversations with busts" everyday. :kaoswt2:
Comedy is third person, tragedy is first person.
Man. A historic 130 year old church nearby had all of its windows broken out with bricks last night. Such a shame, it wasn't generic stained glass patterns either but had beautifully crafted murals depicting various parts of the gospels.

Forum statistics

Threads
99,320
Messages
964,133
Members
130,928
Latest member
LadyElselin
Top