Thread: [Question] GIF Pokemon Attack
View Single Post
  #4    
Old April 4th, 2013 (12:33 PM).
Luka S.J.'s Avatar
Luka S.J. Luka S.J. is offline
@LukaSJ0
 
Join Date: Dec 2008
Location: Croatia
Age: 21
Gender: Male
Nature: Adamant
Posts: 831
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.
__________________
Reply With Quote