Aliasing Use_Item causing delay?

Hello, I'm trying to simplify some scripts and make them more compatible.

I have this script for playing sprite effects, and just cast animations - but the only way I get it to work as I want it too, is by overwriting the Use_Item call.

If I try to have the animations called/played through an alias, they will play after the actor/enemy deals damage.

Code:
class Scene_Battle < Scene_Base 

  #-----------------------------------------------------------------------------
  # * Use Item (Overwrite)
  #-----------------------------------------------------------------------------
  def use_item
    item_use_animation
    item = @subject.current_action.item
    @log_window.display_use_item(@subject, item)
    @subject.use_item(item)
    refresh_status
    targets = @subject.current_action.make_targets.compact
    show_animation(targets, item.animation_id)
    targets.each {|target| item.repeats.times { invoke_item(target, item) } }
  end

  #-----------------------------------------------------------------------------
  # * Item Use Animations
  #-----------------------------------------------------------------------------
  def item_use_animation
   
    item = @subject.current_action.item
    #---------------------------------------------------------------------------
    # Cast Animation
    #---------------------------------------------------------------------------
    if item.note =~/<cast_animation:(.*)>/
     @subject.animation_id = "#$1".to_i
     @log_window.wait
     wait_for_animation
    end
 end
end
How exactly u did the alias?
Code:
alias use_item_animation use_item
def use_item
use_item_animation
 item_use_animation
end

I have to think of a better alias term, but it just calls that bit of script that plays the cast animations and idle effects.
Then why not swap the order? your method first then the alias.
I didn't know you could alias something like that. But now it's working great! Thanks a lot Theo.

This is the code that ended up working:
Code:
  alias item_use_animation use_item
  def use_item
  use_item_animation
   item_use_animation
  end

Original thread: https://forums.rpgmakerweb.com/threads/aliasing-use_item-causing-delay.103220/