Help - Finishing Blow/Last Attack

Hello! I'm sorry for making multiple threads (2 threads) within few hours. 🙁

I wonder how to make different cutscenes depending on who did the finishing blow (who killed the enemy first).
I want to do something like this:
-There are 4 heroes
-If hero 1 killed the boss, the following cutscene will be a narrative about how hero 1 struggled so hard to fight the monster
-If hero 2 killed the boss, the following cutscene will be a narrative about how hero 2 can defeat the monster easily with his brilliant strategy
-Hero 3 and 4 have different naratives too

How to do that?

Thank you in advance!
The simplest way I know is to add a small snippet to every skill an actor can use. At the beginning of every damage formula, add this;

"v[10] = a.actorId(); "

Without the quotes, putting this before the damage formula will set Variable 10 to the actor's ID. For instance:

v[10] = a.actorId(); a.atk * 4 - b.def * 2

The damage is the last line checked. All the first part does is change a variable. Then, in the event that checks when the boss is dead, use Conditional Branches to see what the variable is. That variable is constantly changing, but it stops when the boss dies. Done this way, it's also set up for any future fight to work with. Note that this assumes that the boss is the only enemy OR that you are running the event during battle when the boss dies.

Do be careful, if an enemy tries to use the skill it might throw an error.

Original thread: https://forums.rpgmakerweb.com/threads/help-finishing-blow-last-attack.86450/