Flash red after damage

How would I go about making it so when the player gets hit by an enemy the screen flashes red for a second or 2?
Use combat animations? There's a flash screen option.
You could do it as a plugin. The below code will at least get you started, if you want to tinker.

Code:
Game_Action.prototype.executeHpDamage = function(target, value) {
    if (this.isDrain()) {
        value = Math.min(target.hp, value);
    }
    this.makeSuccess(target);
    target.gainHp(-value);
    if (value > 0) {
        target.onDamage(value);
    }
    this.gainDrainedHp(value);
    // Red flash
    if (target.isActor()) {
        $gameScreen.startFlash([255, 0, 0, 75], 30);
    }
};

Edit: if you just want something ready to go, you can save this as a .js file and install it as a plugin:

Code:
(function() {

var _Game_Action_executeHpDamage = Game_Action.prototype.executeHpDamage;
Game_Action.prototype.executeHpDamage = function(target, value) {
  _Game_Action_executeHpDamage.call(this, target, value);
  if (target.isActor() && value > 0) {
     $gameScreen.startFlash([255, 0, 0, 75], 60);
  }
};

})();

Original thread: https://forums.rpgmakerweb.com/threads/flash-red-after-damage.106171/