A simple script that makes targets flash white.

It is only this: I wish that enemies and actors (who are visible in my project, thanks to Victor Actors Battlers) flash with white light while targeting them with skills, items or attacks. Nothing more, nothing less.

So, can someone do this script for me? If there is already a script that makes this, post it here or link to the author's script post because I couldn't find it by Googling.
bump
Ruby:
# ╔═══════════════════════════════════════════════╦════════════════════╗
# ║ Title: Enemy Target Flash                     ║  Version: 1.00     ║
# ║ Author: Roninator2                            ║                    ║
# ╠═══════════════════════════════════════════════╬════════════════════╣
# ║ Function:                                     ║   Date Created     ║
# ║                                               ╠════════════════════╣
# ║   Alter spriteset effect on enemy             ║    07 Jan 2024     ║
# ╚═══════════════════════════════════════════════╩════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Requires: nil                                                      ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Brief Description:                                                 ║
# ║       Flash Enemy sprite when selecting the enemy                  ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Instructions:                                                      ║
# ║   Plug and play                                                    ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Updates:                                                           ║
# ║ 1.00 - 07 Jan 2024 - Script finished                               ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Credits and Thanks:                                                ║
# ║   Roninator2                                                       ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Terms of use:                                                      ║
# ║  Follow the original Authors terms of use where applicable         ║
# ║    - When not made by me (Roninator2)                              ║
# ║  Free for all uses in RPG Maker except nudity                      ║
# ║  Anyone using this script in their project before these terms      ║
# ║  were changed are allowed to use this script even if it conflicts  ║
# ║  with these new terms. New terms effective 03 Apr 2024             ║
# ║  No part of this code can be used with AI programs or tools        ║
# ║  Credit must be given                                              ║
# ╚════════════════════════════════════════════════════════════════════╝

#==============================================================================
# ■ Window_BattleEnemy
#------------------------------------------------------------------------------
#  This is the window where you select the enemy character 
#    to act on on the battle screen.
#==============================================================================

class Window_BattleEnemy < Window_Selectable

  #--------------------------------------------------------------------------
  # ● window display
  #--------------------------------------------------------------------------
  alias show2 show
  def show
    @target_anim_on = true
    @old_index = nil
    show2
  end
  #--------------------------------------------------------------------------
  # ● Hiding a window
  #--------------------------------------------------------------------------
  alias hide2 hide
  def hide
    old_enemy.sprite_effect_type = :whiten_loop_stop if @old_index != nil
    enemy.sprite_effect_type = :whiten_loop_stop
    @target_anim_on = false
    @old_index = nil
    hide2
  end
  #--------------------------------------------------------------------------
  # ● Window update
  #--------------------------------------------------------------------------
  def update
    super
    update_target_anim
  end
  #--------------------------------------------------------------------------
  # ● Target anime update
  #--------------------------------------------------------------------------
  def update_target_anim
    return if @target_anim_on == nil
    if @target_anim_on && @index != @old_index
      old_enemy.sprite_effect_type = :whiten_loop_stop if @old_index != nil
      enemy.sprite_effect_type = :whiten_loop
    end
    @old_index = @index    
  end
  #--------------------------------------------------------------------------
  # ● Get previous enemy character object
  #--------------------------------------------------------------------------
  def old_enemy
    $game_troop.alive_members[@old_index]
  end

end

#==============================================================================
# ■ Sprite_Battler
#------------------------------------------------------------------------------
# This is a sprite for displaying a battler. 
# Game_Battler monitor instances of a class,
# Automatically change the sprite's state.
#==============================================================================
class Sprite_Battler < Sprite_Base

  #--------------------------------------------------------------------------
  # ● Start of effect
  #--------------------------------------------------------------------------
  def start_effect(effect_type)
    @effect_type = effect_type
    case @effect_type
    when :appear
      @effect_duration = 16
      @battler_visible = true
    when :disappear
      @effect_duration = 32
      @battler_visible = false
    when :whiten
      @effect_duration = 16
      @battler_visible = true
    when :blink
      @effect_duration = 20
      @battler_visible = true
    when :collapse
      @effect_duration = 48
      @battler_visible = false
    when :boss_collapse
      @effect_duration = bitmap.height
      @battler_visible = false
    when :instant_collapse
      @effect_duration = 16
      @battler_visible = false
    when :whiten_loop
      @whiten_cnt = 0.0
      @effect_duration = -1
      @battler_visible = true
    when :whiten_loop_stop
      @effect_duration = -1
    end
    revert_to_normal
  end
  #--------------------------------------------------------------------------
  # ● Effect update
  #--------------------------------------------------------------------------
  alias update_effect2 update_effect
  def update_effect
    update_effect2
    if @effect_duration < 0
      case @effect_type
      when :whiten_loop
        update_whiten_loop
      when :whiten_loop_stop
        update_whiten_loop_stop
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● Effect on selection
  #--------------------------------------------------------------------------
  def update_whiten_loop
    d=(-90+@whiten_cnt/180)*Math::PI
    col = 255 * Math.sin(d)
    @whiten_cnt += 6
    @whiten_cnt %= 180        
    self.color.set(col, col, col, col)
  end
  #--------------------------------------------------------------------------
  # ● Effect ends when selected
  #--------------------------------------------------------------------------
  def update_whiten_loop_stop
    @whiten_cnt = 0.0
    self.color.set(0, 0, 0, 0)
    @effect_duration = 0
    @effect_type = nil
  end
end
Ruby:
#==============================================================================
# ** Window_BattleEnemy
#==============================================================================
class Window_BattleEnemy < Window_Selectable
  alias r2_enemy_window_init  initialize
  def initialize(info_viewport)
    r2_enemy_window_init(info_viewport)
    @blink_timer = 0
  end
  alias r2_enemy_whiten_process process_handling
  def process_handling
    r2_enemy_whiten_process
    return unless open? && active
    @blink_timer = 30 if @blink_timer == 0
    $game_troop.alive_members[index].sprite_effect_type = :whiten if  @blink_timer >= 30
    @blink_timer -= 1
  end
  alias r2_enemy_window_hide  hide
  def hide
    @blink_timer = 0
    r2_enemy_window_hide
  end
end

#==============================================================================
# ** Window_BattleActor
#==============================================================================
class Window_BattleActor < Window_BattleStatus
  alias r2_actor_window_init  initialize
  def initialize(info_viewport)
    r2_actor_window_init(info_viewport)
    @blink_timer = 0
  end
  alias r2_actor_whiten_process process_handling
  def process_handling
    r2_actor_whiten_process
    return unless open? && active
    @blink_timer = 30 if @blink_timer == 0
    $game_party.members[index].sprite_effect_type = :whiten if  @blink_timer >= 30
    @blink_timer -= 1
  end
  alias r2_actor_window_hide  hide
  def hide
    @blink_timer = 0
    r2_actor_window_hide
  end
end
Thank you, it worked exactly as I want!!!
Ye gods, Roninator, you are amazing! Can we use your script in commercial projects?

(Also, thank you Koudelka for asking for this 👍)
Ye gods, Roninator, you are amazing! Can we use your script in commercial projects?

(Also, thank you Koudelka for asking for this 👍)
The only terms I have ever had was 'not allowed to use for nudity projects'
otherwise free.

Original thread: https://forums.rpgmakerweb.com/threads/a-simple-script-that-makes-targets-flash-white.160407/