Thread: [Question] GIF Pokemon Attack
View Single Post
  #10    
Old April 14th, 2013, 06:50 PM
IceGod64's Avatar
IceGod64
My imagination.
 
Join Date: Oct 2008
Location: Castelia City
Age: 26
Gender: Male
Nature: Naive
Quote:
Originally Posted by Luka S.J. View Post
You never simply replace the old sprites with newer, and expect everything to be automagically done. While Pokemon Essentials itself supports GIF images, the battle system wasn't designed to be using them. The reason why at some parts the GIFs animate, and at some they don't: is that some parts of the PokeBattle_ActualScene code contain the @sprites["pokemon#{i}"].update function and others don't. You'd need to find the right places within the Battle System itself where you'd put these updates.

Using the function pbFrameUpdate(nil) is what you're looking for. This function updates the sprites and the battle boxes of the various Pokemon, now you just have to insert them in the right place. Some are more obvious than others. Just do a quick search for general updates in the battle system, and you'll know where to put them. One of the updates that you were looking for is within def pbAnimationCore. There you'll see a chunk of code which looks like
Code:
while animplayer.playing?
  animplayer.update
  pbGraphicsUpdate
  pbInputUpdate
end
In there, with all the other updates, you just stick in pbFrameUpdate(nil), and the sprites will animate during attack animations.

With all this said, again, I will refer you to a post I made a while back.
Is this what you were asking for Maruno?
__________________

Reply With Quote