[XP] Changing Animation Graphic file on the fly via scripts.

Started by Lucern7, November 04, 2018, 10:52:26 pm

Previous topic - Next topic

Lucern7

Simply but I have some animations that have the same timing, and sound effects and stuff, but different animation sheets, it'd save a lot of time and space if I could just swap the files with scripts, but I can't seem to find a path from the help files and such for that specific datatype.

I feel like it'd be one line of code, but I can't seem to work it out.

KK20

In the help file for RPG::Animation
Quoteanimation_name
The animation's graphic file name.

When playing an animation on a sprite, it calls RPG::Sprite#animation, as also shown in the help file

    def animation(animation, hit)
      dispose_animation
      @_animation = animation
      return if @_animation == nil
      @_animation_hit = hit
      @_animation_duration = @_animation.frame_max
      animation_name = @_animation.animation_name #<== This right here

So what you most likely want is a rewritten RPG::Sprite#animation method that takes in 3 parameters where this new third parameter tells the game what file graphic to use instead of what is defined in the database.

Then again, I don't know what it is exactly you need this feature for that could be done by simply copy-pasting animations.





   


   
   


   
   

Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!



Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

LiTTleDRAgo