MV SOLVED Actor play motion while actions are selecting

My current game is Sideview. I want to make that while an actor are selecting the actions they execute a Motion like Cast or Victory until end of they selection, some advice on how to achieve this or plugin.
You need Yanfly's Battle Engine Core, due to having a method to force motions (after testing for some hours, vanilla MV is not enough to achieve this—at least for me—).

In Line 4, change 'abnormal' for your desired motion.

JavaScript:
var _startActorCommandSelection = Scene_Battle.prototype.startActorCommandSelection;
Scene_Battle.prototype.startActorCommandSelection = function() {
  _startActorCommandSelection.call(this);
  $gameActors.actor(BattleManager.actor().actorId()).requestMotion('abnormal'); //Change Actor Motion when is Inputting
};

var _endCommandSelection = Scene_Battle.prototype.endCommandSelection;
Scene_Battle.prototype.endCommandSelection = function() {
  _endCommandSelection.call(this);
  if (BattleManager.actor() != null) {
    $gameActors.actor(BattleManager.actor().actorId()).forceMotionRefresh();
  };
};
Very thankful for your help🙂. By the way cute video in the CutsceneHeartEdition 😉

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-actor-play-motion-while-actions-are-selecting.137539/