Critical hit - screen flash

xarxesxarxes

Villager
Member
Joined
Jan 10, 2016
Messages
6
Reaction score
1
First Language
French
Primarily Uses
I would like to know how to make it so when an actor/enemy
does a critical hit, the screen flashes instead of flash effect
on the damage popup.
 

xarxesxarxes

Villager
Member
Joined
Jan 10, 2016
Messages
6
Reaction score
1
First Language
French
Primarily Uses
@TSR
Thank you for your plugin.
Is there a way to only use the flash screen effect on criticals with your script.
Because as far as i know the only way to have it is to 'Enable Damage Sheet',
and I already have my damage popup sprites/popup animation
with another plugin.
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
279
Reaction score
244
First Language
French
Primarily Uses
RMMV
Hello again. You can call the critical effect function externally using:
Code:
Sprite_Damage.prototype.setupCriticalEffect();
You need to turn OFF the Show Critical popup in the Plugin parameter if you don't use my Sprite sheet, but calling that function will show the screen effect, and you can customize it with the Plugin parameters.
 

xarxesxarxes

Villager
Member
Joined
Jan 10, 2016
Messages
6
Reaction score
1
First Language
French
Primarily Uses
Hi TSR
I'm not very used to customize plugins.
So where would I copy that line Sprite_Damage.prototype.setupCriticalEffect();
Would it be in rpg_sprites.js or rpg_objects.js, I know there are several lines
with mentions of critical hits in these files. But under which line of text should I copy it?
Thank you for taking the time to help me out!!
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
279
Reaction score
244
First Language
French
Primarily Uses
RMMV
Hello. Don't modify the core js files, edit my Plugin instead.
Search for this in the file:
Code:
if (result.hpAffected) {
         this.createDigits(0, result.hpDamage);
         if (TSR.Param.EnableDamageSheet) {   
           if (critical && TSR.Param.ShowCritical) {
             this.setupCriticalEffect();
             this.createCritical(target);
           }
And put the function outside the condition for Enable Sprite sheet, like this:
Code:
if (result.hpAffected) {
         this.createDigits(0, result.hpDamage);
         if (critical) this.setupCriticalEffect(); \\added this line
         if (TSR.Param.EnableDamageSheet) {   
           if (critical && TSR.Param.ShowCritical) {
             this.setupCriticalEffect();
             this.createCritical(target);
           }
The tricky part is this appear twice in the Plugin for working with or without Yanfly BattleEngine core. So you'll have to change the good part or change both to be sure.
 

xarxesxarxes

Villager
Member
Joined
Jan 10, 2016
Messages
6
Reaction score
1
First Language
French
Primarily Uses
Hi again
It works perfectly now.
Thanks a lot for replying fast and helping me out!
 
  • Like
Reactions: TSR

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

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

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.

Forum statistics

Threads
106,040
Messages
1,018,472
Members
137,822
Latest member
madelbylz
Top