Vendily

Trainer Intro Animation Template v18

Nov 7th, 2020
2,121
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class TrainerIntroAnimation < PokeBattle_Animation
  2.   def initialize(sprites,viewport,battle)
  3.     @battle=battle
  4.     super(sprites,viewport)
  5.   end
  6.  
  7.   def createProcesses
  8.     @battle.opponent.each_with_index do |p,i|
  9.       # rinse and repeat with each new trainer. Feel free to adjust the PictureEx animation
  10.       if isConst?(p.trainertype,PBTrainers,:RIVAL_SILVER)
  11.         trpic = addSprite(@sprites["trainer_#{i+1}"],PictureOrigin::Bottom)
  12.         trpic.setName(10,"Graphics/Trainers/secondframe")
  13.         trpic.setName(15,"Graphics/Trainers/thirdframe")
  14.       end
  15.     end
  16.   end
  17. end
  18.  
  19. # place under comment pointing out where trainer animations should go in def pbBattleIntroAnimation
  20. @animations.push(TrainerIntroAnimation.new(@sprites,@viewport,@battle))
RAW Paste Data