RPG Maker Forums

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top