Scripts, Tutorials & Tools This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old October 16th, 2018 (2:12 PM). Edited October 16th, 2018 by WolfPP.
WolfPP's Avatar
WolfPP WolfPP is online now
     
    Join Date: Aug 2018
    Location: Brazil
    Gender: Male
    Nature: Jolly
    Posts: 170
    Hi guys!

    I'll create new animations and add them here when I finish.
    THAT SCRIPTS ARE FOR THE EBS - ELITE BATTLE SYSTEM (by Luka S.J.).

    You just need to paste the script into 'MoveAnimations Script', under 'def pbAnimation (moveid, user, target, hitnum = 0)' between last 'end' and bug bite script Like:

    Code:
      end
    PASTE HERE
      #-----------------------------------------------------------------------------
      #  Bug Bite
      #-----------------------------------------------------------------------------
    If you have custom animations and you want to share with us, feel free (and we would even appreciate it).

    Counter (your move.txt will have that move in 115):
    Spoiler:

    Code:
      #-----------------------------------------------------------------------------
      #  Counter
      #-----------------------------------------------------------------------------
      def pbMoveAnimationSpecific115(userindex,targetindex,hitnum=0,multihit=false)
        # inital configuration
        usersprite = @sprites["pokemon#{userindex}"]
        targetsprite = @sprites["pokemon#{targetindex}"]
        player = (targetindex%2==0)
        itself = (userindex==targetindex)
        factor = (player ? 2 : 1.5)
        defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
        # set up animation
        fp = {}
        fp["bg"] = Sprite.new(targetsprite.viewport)
        fp["bg"].bitmap = Bitmap.new(targetsprite.viewport.rect.width,targetsprite.viewport.rect.height)
        fp["bg"].bitmap.fill_rect(0,0,fp["bg"].bitmap.width,fp["bg"].bitmap.height,Color.new(217/6,189/6,52/6))
        fp["bg"].opacity = 0
        l = 0; m = 0; q = 0
        for i in 0...12
          fp["#{i}"] = Sprite.new(targetsprite.viewport)
          fp["#{i}"].opacity = 0
          fp["#{i}"].z = 51
        end
        fp["punch"] = Sprite.new(targetsprite.viewport)
        fp["punch"].bitmap = pbBitmap("Graphics/Animations/eb108")
        fp["punch"].ox = fp["punch"].bitmap.width/2
        fp["punch"].oy = fp["punch"].bitmap.height/2
        fp["punch"].opacity = 0
        fp["punch"].z = 40
        fp["punch"].angle = 180
        fp["punch"].zoom_x = player ? 6 : 4
        fp["punch"].zoom_y = player ? 6 : 4
        fp["punch"].color = Color.new(217,189,52,50)
        # start animation
        @vector.set(getRealVector(targetindex,player))
        pbSEPlay("#{SE_EXTRA_PATH}fog2",75)
        for i in 0...72
          cx, cy = getCenter(targetsprite,true)
          fp["punch"].x = cx
          fp["punch"].y = cy
          fp["punch"].angle -= 45 if i < 40
          fp["punch"].zoom_x -= player ? 0.2 : 0.15 if i < 40
          fp["punch"].zoom_y -= player ? 0.2 : 0.15 if i < 40
          fp["punch"].opacity += 8 if i < 40
          if i >= 40
            fp["punch"].tone = Tone.new(255,255,255) if i == 40
            fp["punch"].toneAll(-25.5)
            fp["punch"].opacity -= 25.5
          end
          pbSEPlay("#{SE_EXTRA_PATH}hit") if i==40
          for n in 0...12
            next if m>(i-40)/4
            fp["#{n}"].opacity += 51 if fp["#{n}"].tone.gray == 0
            fp["#{n}"].tone.gray = 1 if fp["#{n}"].opacity >= 255
            q += 1 if fp["#{n}"].opacity >= 255
            fp["#{n}"].opacity -= 10 if fp["#{n}"].tone.gray > 0 && q > 96
          end
          fp["bg"].opacity += 4 if  i < 40
          fp["bg"].opacity -= 10 if i >= 56
          targetsprite.tone = Tone.new(100,80,60) if i == 40
          if i >= 40
            if (i-40)/3 > l
              m += 1
              m = 0 if m > 1
              l = (i-40)/3
            end
            targetsprite.zoom_y -= 0.16*(m==0 ? 1 : -1)
            targetsprite.zoom_x += 0.08*(m==0 ? 1 : -1)
            targetsprite.tone.red -= 5 if targetsprite.tone.red > 0
            targetsprite.tone.green -= 4 if targetsprite.tone.green > 0
            targetsprite.tone.blue -= 3 if targetsprite.tone.blue > 0
            targetsprite.still
          end
          wait(1,(i < 40))
        end
        @vector.set(defaultvector) if !multihit
        pbDisposeSpriteHash(fp)
        return true
      end


    Force Palm (move.txt = 102) eb_109 in attachments
    Spoiler:

    Code:
      #-----------------------------------------------------------------------------
      #  Force Palm
      #-----------------------------------------------------------------------------
      def pbMoveAnimationSpecific102(userindex,targetindex,hitnum=0,multihit=false)
        # inital configuration
        usersprite = @sprites["pokemon#{userindex}"]
        targetsprite = @sprites["pokemon#{targetindex}"]
        player = (targetindex%2==0)
        itself = (userindex==targetindex)
        factor = (player ? 2 : 1.5)
        defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
        # set up animation
        fp = {}
        fp["bg"] = Sprite.new(targetsprite.viewport)
        fp["bg"].bitmap = Bitmap.new(targetsprite.viewport.rect.width,targetsprite.viewport.rect.height)
        fp["bg"].bitmap.fill_rect(0,0,fp["bg"].bitmap.width,fp["bg"].bitmap.height,Color.new(217/6,189/6,52/6))
        fp["bg"].opacity = 0
        l = 0; m = 0; q = 0
        for i in 0...12
          fp["#{i}"] = Sprite.new(targetsprite.viewport)
          fp["#{i}"].opacity = 0
          fp["#{i}"].z = 51
        end
        fp["punch"] = Sprite.new(targetsprite.viewport)
        fp["punch"].bitmap = pbBitmap("Graphics/Animations/eb109")
        fp["punch"].ox = fp["punch"].bitmap.width/2
        fp["punch"].oy = fp["punch"].bitmap.height/2
        fp["punch"].opacity = 0
        fp["punch"].z = 40
        fp["punch"].angle = 180
        fp["punch"].zoom_x = player ? 6 : 4
        fp["punch"].zoom_y = player ? 6 : 4
        #fp["punch"].color = Color.new(217,189,52,50)
        fp["punch"].color = Color.new(180,53,2,0)
        # start animation
        @vector.set(getRealVector(targetindex,player))
        pbSEPlay("#{SE_EXTRA_PATH}fog2",75)
        for i in 0...72
          cx, cy = getCenter(targetsprite,true)
          fp["punch"].x = cx
          fp["punch"].y = cy
          fp["punch"].angle -= 45 if i < 40
          fp["punch"].zoom_x -= player ? 0.2 : 0.15 if i < 40
          fp["punch"].zoom_y -= player ? 0.2 : 0.15 if i < 40
          fp["punch"].opacity += 8 if i < 40
          if i >= 40
            fp["punch"].tone = Tone.new(255,255,255) if i == 40
            fp["punch"].toneAll(-25.5)
            fp["punch"].opacity -= 25.5
          end
          pbSEPlay("#{SE_EXTRA_PATH}hit") if i==40
          for n in 0...12
            next if m>(i-40)/4
            fp["#{n}"].opacity += 51 if fp["#{n}"].tone.gray == 0
            fp["#{n}"].tone.gray = 1 if fp["#{n}"].opacity >= 255
            q += 1 if fp["#{n}"].opacity >= 255
            fp["#{n}"].opacity -= 10 if fp["#{n}"].tone.gray > 0 && q > 96
          end
          fp["bg"].opacity += 4 if  i < 40
          fp["bg"].opacity -= 10 if i >= 56
          targetsprite.tone = Tone.new(100,80,60) if i == 40
          if i >= 40
            if (i-40)/3 > l
              m += 1
              m = 0 if m > 1
              l = (i-40)/3
            end
            targetsprite.zoom_y -= 0.16*(m==0 ? 1 : -1)
            targetsprite.zoom_x += 0.08*(m==0 ? 1 : -1)
            targetsprite.tone.red -= 5 if targetsprite.tone.red > 0
            targetsprite.tone.green -= 4 if targetsprite.tone.green > 0
            targetsprite.tone.blue -= 3 if targetsprite.tone.blue > 0
            targetsprite.still
          end
          wait(1,(i < 40))
        end
        @vector.set(defaultvector) if !multihit
        pbDisposeSpriteHash(fp)
        return true
      end


    I will make new animations from what the system already has, and sharing with you here in this topic.

    See you later!
    Attached Images
    File Type: png eb109.png‎ (833 Bytes, 386 views) (Save to Dropbox)
    Reply With Quote
      #2   Link to this post, but load the entire thread.  
    Old October 30th, 2018 (11:07 AM).
    ArchyTheArc ArchyTheArc is offline
       
      Join Date: Apr 2017
      Posts: 86
      This is something i've been wondering about for ages! thanks for making this script/tutorial kinda so i know how to add/make new animations (kinda)

      Hope you/others (or me if i can ever make animations well) keep this alive so EBS gets most/all official moves animated or give developers knowledge on making more move animations.

      One thing i've been unsure on how to do more, if possible, is the terrain moves, with their coding would them having animations act as move animations or like the weathers? (if you know that) sorry to pester with questions/ requests ig jsut wondering how they'd work! ^^;
      Reply With Quote
        #3   Link to this post, but load the entire thread.  
      Old October 30th, 2018 (11:05 PM).
      thepsynergist's Avatar
      thepsynergist thepsynergist is offline
      A Gym Leader, Kyushu Region
         
        Join Date: Mar 2009
        Location: California, USA
        Age: 28
        Gender: Male
        Nature: Adamant
        Posts: 759
        This helps a bunch. I've just been lazily recoloring a lot of the other moves over for use.
        __________________




        Pokemon Pyrite is now complete, check out the trailer/download link here: https://www.youtube.com/watch?v=X6g5pXPXyV4
        Reply With Quote
          #4   Link to this post, but load the entire thread.  
        Old October 31st, 2018 (6:34 AM). Edited October 31st, 2018 by WolfPP.
        WolfPP's Avatar
        WolfPP WolfPP is online now
           
          Join Date: Aug 2018
          Location: Brazil
          Gender: Male
          Nature: Jolly
          Posts: 170
          Quote:
          Originally Posted by ArchyTheArc View Post
          This is something i've been wondering about for ages! thanks for making this script/tutorial kinda so i know how to add/make new animations (kinda)

          Hope you/others (or me if i can ever make animations well) keep this alive so EBS gets most/all official moves animated or give developers knowledge on making more move animations.

          One thing i've been unsure on how to do more, if possible, is the terrain moves, with their coding would them having animations act as move animations or like the weathers? (if you know that) sorry to pester with questions/ requests ig jsut wondering how they'd work! ^^;
          Oh! Of course i will! Im vacation now, but untill friday i will make them...

          Im concentrate in necrozma's moves, like photon geyser, sun steel strike and moon bla bla cuz im mergin EBS to Z-Move :D (look: https://www.pokecommunity.com/showthread.php?t=414602&highlight=z-move)
          Reply With Quote
            #5   Link to this post, but load the entire thread.  
          Old October 31st, 2018 (6:48 AM).
          rekman's Avatar
          rekman rekman is offline
             
            Join Date: Jan 2018
            Posts: 20
            Good idea Wolf!
            I made in few seconds those 3 animations with the same code you used:
            Bone Club, Bonemerang, Bone Rush
            Download the graphic attachment.
            Spoiler:
            Code:
              #-----------------------------------------------------------------------------
              #  Bone Club
              #-----------------------------------------------------------------------------
              def pbMoveAnimationSpecific227(userindex,targetindex,hitnum=0,multihit=false)
                # inital configuration
                usersprite = @sprites["pokemon#{userindex}"]
                targetsprite = @sprites["pokemon#{targetindex}"]
                player = (targetindex%2==0)
                itself = (userindex==targetindex)
                factor = (player ? 2 : 1.5)
                defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
                # set up animation
                fp = {}
                fp["bg"] = Sprite.new(targetsprite.viewport)
                fp["bg"].bitmap = Bitmap.new(targetsprite.viewport.rect.width,targetsprite.viewport.rect.height)
                fp["bg"].bitmap.fill_rect(0,0,fp["bg"].bitmap.width,fp["bg"].bitmap.height,Color.new(217/6,189/6,52/6))
                fp["bg"].opacity = 0
                l = 0; m = 0; q = 0
                for i in 0...12
                  fp["#{i}"] = Sprite.new(targetsprite.viewport)
                  fp["#{i}"].opacity = 0
                  fp["#{i}"].z = 51
                end
                fp["punch"] = Sprite.new(targetsprite.viewport)
                fp["punch"].bitmap = pbBitmap("Graphics/Animations/eb227")
                fp["punch"].ox = fp["punch"].bitmap.width/2
                fp["punch"].oy = fp["punch"].bitmap.height/2
                fp["punch"].opacity = 0
                fp["punch"].z = 40
                fp["punch"].angle = 180
                fp["punch"].zoom_x = player ? 6 : 4
                fp["punch"].zoom_y = player ? 6 : 4
                #fp["punch"].color = Color.new(217,189,52,50)
                fp["punch"].color = Color.new(180,53,2,0)
                # start animation
                @vector.set(getRealVector(targetindex,player))
                pbSEPlay("#{SE_EXTRA_PATH}fog2",75)
                for i in 0...72
                  cx, cy = getCenter(targetsprite,true)
                  fp["punch"].x = cx
                  fp["punch"].y = cy
                  fp["punch"].angle -= 45 if i < 40
                  fp["punch"].zoom_x -= player ? 0.2 : 0.15 if i < 40
                  fp["punch"].zoom_y -= player ? 0.2 : 0.15 if i < 40
                  fp["punch"].opacity += 8 if i < 40
                  if i >= 40
                    fp["punch"].tone = Tone.new(255,255,255) if i == 40
                    fp["punch"].toneAll(-25.5)
                    fp["punch"].opacity -= 25.5
                  end
                  pbSEPlay("#{SE_EXTRA_PATH}hit") if i==40
                  for n in 0...12
                    next if m>(i-40)/4
                    fp["#{n}"].opacity += 51 if fp["#{n}"].tone.gray == 0
                    fp["#{n}"].tone.gray = 1 if fp["#{n}"].opacity >= 255
                    q += 1 if fp["#{n}"].opacity >= 255
                    fp["#{n}"].opacity -= 10 if fp["#{n}"].tone.gray > 0 && q > 96
                  end
                  fp["bg"].opacity += 4 if  i < 40
                  fp["bg"].opacity -= 10 if i >= 56
                  targetsprite.tone = Tone.new(100,80,60) if i == 40
                  if i >= 40
                    if (i-40)/3 > l
                      m += 1
                      m = 0 if m > 1
                      l = (i-40)/3
                    end
                    targetsprite.zoom_y -= 0.16*(m==0 ? 1 : -1)
                    targetsprite.zoom_x += 0.08*(m==0 ? 1 : -1)
                    targetsprite.tone.red -= 5 if targetsprite.tone.red > 0
                    targetsprite.tone.green -= 4 if targetsprite.tone.green > 0
                    targetsprite.tone.blue -= 3 if targetsprite.tone.blue > 0
                    targetsprite.still
                  end
                  wait(1,(i < 40))
                end
                @vector.set(defaultvector) if !multihit
                pbDisposeSpriteHash(fp)
                return true
              end
              #-----------------------------------------------------------------------------
              #  Bonemerang
              #-----------------------------------------------------------------------------  
              def pbMoveAnimationSpecific231(userindex,targetindex,hitnum=0,multihit=false)
                return pbMoveAnimationSpecific227(userindex,targetindex,hitnum=0,multihit=false)
              end
              #-----------------------------------------------------------------------------
              #  Bone Rush
              #-----------------------------------------------------------------------------  
              def pbMoveAnimationSpecific233(userindex,targetindex,hitnum=0,multihit=false)
                pbMoveAnimationSpecific227(userindex,targetindex,hitnum=0,multihit=false)
              end


            I've made other animations for my game but they are not really good. Maybe if other people come up with new animations, I will put them with a bit of work of respriting.
            Attached Images
            File Type: png eb227.png‎ (1.6 KB, 326 views) (Save to Dropbox)
            __________________
            Pokemon Winter Memories ~ Developing..
            ________________________
            Defining trainers' EV through formula: https://www.pokecommunity.com/showthread.php?t=414192
            Reply With Quote
              #6   Link to this post, but load the entire thread.  
            Old November 2nd, 2018 (3:59 PM). Edited November 2nd, 2018 by Luka S.J..
            Luka S.J.'s Avatar
            Luka S.J. Luka S.J. is offline
            Jealous Croatian
               
              Join Date: Dec 2008
              Location: Croatia
              Age: 25
              Gender: Male
              Nature: Adamant
              Posts: 1,116
              In case you want a point of reference, I used the following video when making the animations from scratch in Essentials, to get them close to what they look like in the official gen 5 games.

              The graphics I had to make from scratch, though the sound effects were provided to me by BadSamaritan (who seems to have deleted all their forum postsposts in the EBS thread) which I don't have anymore to in turn give to you, unfortunately.



              Hope the video can do you some good at least.
              __________________

              Reply With Quote
                #7   Link to this post, but load the entire thread.  
              Old November 3rd, 2018 (3:51 PM).
              rekman's Avatar
              rekman rekman is offline
                 
                Join Date: Jan 2018
                Posts: 20
                Spoiler:
                Quote:
                Originally Posted by Luka S.J. View Post
                In case you want a point of reference, I used the following video when making the animations from scratch in Essentials, to get them close to what they look like in the official gen 5 games.

                The graphics I had to make from scratch, though the sound effects were provided to me by BadSamaritan (who seems to have deleted all their forum postsposts in the EBS thread) which I don't have anymore to in turn give to you, unfortunately.



                Hope the video can do you some good at least.

                Thanks Luka! I must say that the EBS covers really well a wide range of moves with the common animation script at the bottom of the 7th page of EBS scripts :) Also, in the case one wants to mix already scripted animation of essentials with yours, only FEW moves remain to be scripted because of their particularity (like bone rush, etc..). The video you posted is a very good place where to start.
                I hope that, even if EBS is not available anymore, the community won't stop to improve the animations, that are usually ignored.
                __________________
                Pokemon Winter Memories ~ Developing..
                ________________________
                Defining trainers' EV through formula: https://www.pokecommunity.com/showthread.php?t=414192
                Reply With Quote
                  #8   Link to this post, but load the entire thread.  
                Old November 4th, 2018 (6:22 AM).
                WolfPP's Avatar
                WolfPP WolfPP is online now
                   
                  Join Date: Aug 2018
                  Location: Brazil
                  Gender: Male
                  Nature: Jolly
                  Posts: 170
                  Quote:
                  Originally Posted by Luka S.J. View Post
                  In case you want a point of reference, I used the following video when making the animations from scratch in Essentials, to get them close to what they look like in the official gen 5 games.

                  The graphics I had to make from scratch, though the sound effects were provided to me by BadSamaritan (who seems to have deleted all their forum postsposts in the EBS thread) which I don't have anymore to in turn give to you, unfortunately.



                  Hope the video can do you some good at least.
                  I saw this video. Thanks Luka! Maybe next week i will put a tutorial "How add Z-move in EBS" :D i hope you comment!
                  Reply With Quote
                    #9   Link to this post, but load the entire thread.  
                  Old November 8th, 2018 (6:19 AM).
                  buttjuice's Avatar
                  buttjuice buttjuice is offline
                     
                    Join Date: Jul 2016
                    Gender: Male
                    Nature: Lax
                    Posts: 103
                    Would love to see dig, bounce and any other two turn, invisible move animations for EBS. Maybe looking at the code for fly can help ^^
                    __________________
                    Reply With Quote
                      #10   Link to this post, but load the entire thread.  
                    Old November 8th, 2018 (4:11 PM).
                    WolfPP's Avatar
                    WolfPP WolfPP is online now
                       
                      Join Date: Aug 2018
                      Location: Brazil
                      Gender: Male
                      Nature: Jolly
                      Posts: 170
                      Quote:
                      Originally Posted by buttjuice View Post
                      Would love to see dig, bounce and any other two turn, invisible move animations for EBS. Maybe looking at the code for fly can help ^^
                      Try to make them... Just read how its works some move in 'MoveAnimations Script' and create a animation for these moves :D
                      Reply With Quote
                        #11   Link to this post, but load the entire thread.  
                      Old November 18th, 2018 (5:21 PM). Edited November 18th, 2018 by WolfPP.
                      WolfPP's Avatar
                      WolfPP WolfPP is online now
                         
                        Join Date: Aug 2018
                        Location: Brazil
                        Gender: Male
                        Nature: Jolly
                        Posts: 170
                        Photon Geyser:
                        Spoiler:

                        Code:
                          #-----------------------------------------------------------------------------
                          #  Photon Geyser
                          #-----------------------------------------------------------------------------
                          def pbMoveAnimationSpecific673(userindex,targetindex,hitnum=0,multihit=false)
                            # inital configuration
                            usersprite = @sprites["pokemon#{userindex}"]
                            targetsprite = @sprites["pokemon#{targetindex}"]
                            player = (userindex%2==0)
                            player2 = (targetindex%2==0)
                            itself = (userindex==targetindex)
                            defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
                            @vector.set(getRealVector(userindex,player))
                            fp = {}
                            fp["bg"] = Sprite.new(usersprite.viewport)
                            fp["bg"].drawRect(usersprite.viewport.rect.width,usersprite.viewport.rect.height,Color.new(0,0,0))
                            fp["bg"].opacity = 0
                            16.times do
                              fp["bg"].opacity += 12
                              wait(1,true)
                            end
                            cx, cy = getCenter(usersprite,true)
                            # charging animation
                            for j in 0...8
                              fp["s#{j}"] = Sprite.new(usersprite.viewport)
                              fp["s#{j}"].bitmap = pbBitmap("Graphics/Animations/eb519_2")
                              fp["s#{j}"].center
                              r = 64*usersprite.zoom_x
                              x1, y1 = randCircleCord(r)
                              fp["s#{j}"].x = cx - r + x1
                              fp["s#{j}"].y = cy - r + y1
                              fp["s#{j}"].opacity = 0
                              z = [1.1,1,0.9,1.2,0.8][rand(5)]
                              fp["s#{j}"].zoom_x = z
                              fp["s#{j}"].zoom_y = z
                              fp["s#{j}"].z = usersprite.z + 1
                            end
                            fp["glow"] = Sprite.new(usersprite.viewport)
                            fp["glow"].bitmap = pbBitmap("Graphics/Animations/eb519_3")
                            fp["glow"].center
                            fp["glow"].x = cx
                            fp["glow"].y = cy
                            fp["glow"].opacity = 0
                            fp["glow"].toggle = 1
                        =begin
                            for j in 0...2
                              fp["c#{j}"] = Sprite.new(usersprite.viewport)
                              fp["c#{j}"].bitmap = pbBitmap("Graphics/Animations/eb519_#{5+j}")
                              fp["c#{j}"].center
                              fp["c#{j}"].toggle = 1
                              fp["c#{j}"].x = cx
                              fp["c#{j}"].y = cy
                              fp["c#{j}"].opacity = 0
                              fp["c#{j}"].param = 1
                              fp["c#{j}"].zoom_x = usersprite.zoom_x
                              fp["c#{j}"].zoom_y = usersprite.zoom_y
                              fp["c#{j}"].z = usersprite.z + 1
                            end
                        =end
                            for j in 0...8
                              fp["t#{j}"] = TrailingSprite.new(usersprite.viewport,pbBitmap("Graphics/Animations/ZMove/eb519_9"))
                              fp["t#{j}"].z = usersprite.z + 1
                              r = usersprite.viewport.rect.width
                              x1, y1 = randCircleCord(r)
                              fp["t#{j}"].x = cx - r + x1
                              fp["t#{j}"].y = cy - r + y1
                              fp["t#{j}"].color = Color.new(255,255,255)
                            end
                            fp["circle"] = Sprite.new(usersprite.viewport)
                            fp["circle"].bitmap = pbBitmap("Graphics/Animations/eb519_4_3")
                            fp["circle"].center
                            fp["circle"].x = 50 + cx
                            fp["circle"].y = cy
                            fp["circle"].zoom_x = 0
                            fp["circle"].zoom_y = 0
                            fp["circle"].color = Color.new(0,0,0,0)
                            fp["circle"].param = 0
                            fp["circle"].opacity = 0
                            fp["circle1"] = Sprite.new(usersprite.viewport)
                            fp["circle1"].bitmap = pbBitmap("Graphics/Animations/eb519_4_3")
                            fp["circle1"].center
                            fp["circle1"].x = 50 + cx
                            fp["circle1"].y = cy
                            fp["circle1"].zoom_x = 0
                            fp["circle1"].zoom_y = 0
                            fp["circle1"].color = Color.new(255,255,128,0)
                            fp["circle1"].param = 0
                            fp["circle1"].opacity = 0
                            fp["circle2"] = Sprite.new(usersprite.viewport)
                            fp["circle2"].bitmap = pbBitmap("Graphics/Animations/eb519_4_4")
                            fp["circle2"].center
                            fp["circle2"].x = 50 + cx
                            fp["circle2"].y = cy
                            fp["circle2"].zoom_x = 0
                            fp["circle2"].zoom_y = 0
                            fp["circle2"].color = Color.new(255,255,13,0)
                            fp["circle2"].param = 0
                            fp["circle2"].opacity = 0
                            fp["circle2"].z = viewport.z + 1
                            fp["ripples"] = Sprite.new(usersprite.viewport)
                            fp["ripples"].bitmap = pbBitmap("Graphics/Animations/eb519_7_1")
                            fp["ripples"].center
                            fp["ripples"].x = cx
                            fp["ripples"].y = cy
                            fp["ripples"].opacity = 0
                            fp["ripples"].zoom_x = usersprite.zoom_x
                            fp["ripples"].zoom_y = usersprite.zoom_y
                            fp["ripples"].color = Color.new(255,255,255,0)
                            fp["ripples"].z = usersprite.z + 2
                            pbSEPlay("#{SE_EXTRA_PATH}Harden")
                            for i in 0...148
                              pbSEPlay("#{SE_EXTRA_PATH}Refresh") if i == 16
                              pbSEPlay("#{SE_EXTRA_PATH}Saint8") if i == 68
                              for j in 0...8
                                next if j > i/4
                                fp["s#{j}"].opacity += 48
                                fp["s#{j}"].zoom_x -= 0.0625 if i > 4 + j*4
                                fp["s#{j}"].zoom_y -= 0.0625 if i > 4 + j*4
                                fp["s#{j}"].x -= (cx - fp["s#{j}"].x)*0.01
                                fp["s#{j}"].y -= (cy - fp["s#{j}"].y)*0.01
                              end
                              for j in 0...8
                                next if i < 16
                                next if j > (i-16)/8
                                fp["t#{j}"].x -= (fp["t#{j}"].x - cx)*0.1
                                fp["t#{j}"].y -= (fp["t#{j}"].y - cy)*0.1
                                fp["t#{j}"].color.alpha -= 8
                                fp["t#{j}"].update if i < 128
                                fp["t#{j}"].visible = false if i == 128
                              end
                              if i >= 32
                                fp["circle"].zoom_x += 0.03125 if fp["circle"].zoom_x < 1
                                fp["circle"].zoom_y += 0.03125 if fp["circle"].zoom_y < 1
                                fp["circle"].param = (fp["circle"].param == 0 ? 255 : 0) if i%12 == 0 || i%12 == 4
                                fp["circle"].color.alpha = fp["circle"].param if i < 132
                                fp["circle"].opacity += 8
                                fp["glow"].opacity += i < 132 ? 4 : -32
                                fp["glow"].zoom_x -= 0.02*fp["glow"].toggle
                                fp["glow"].zoom_y -= 0.02*fp["glow"].toggle
                                fp["glow"].toggle *= -1 if i%4 == 0
                              end
                              if i >= 64
                                fp["circle1"].zoom_x += 0.03125 if fp["circle1"].zoom_x < 1
                                fp["circle1"].zoom_y += 0.03125 if fp["circle1"].zoom_y < 1
                                fp["circle1"].param = (fp["circle1"].param == 0 ? 255 : 0) if i%12 == 0 || i%12 == 4
                                fp["circle1"].color.alpha = fp["circle1"].param if i < 132
                                fp["circle1"].opacity += 8
                                fp["glow"].opacity += i < 132 ? 4 : -32
                                fp["glow"].zoom_x -= 0.02*fp["glow"].toggle
                                fp["glow"].zoom_y -= 0.02*fp["glow"].toggle
                                fp["glow"].toggle *= -1 if i%4 == 0
                              end
                              if i >= 112
                                fp["circle2"].zoom_x += 0.03125 if fp["circle2"].zoom_x < 1
                                fp["circle2"].zoom_y += 0.03125 if fp["circle2"].zoom_y < 1
                                fp["circle2"].param = (fp["circle2"].param == 0 ? 255 : 0) if i%12 == 0 || i%12 == 4
                                fp["circle2"].color.alpha = fp["circle2"].param if i < 132
                                fp["circle2"].opacity += 8
                                fp["glow"].opacity += i < 132 ? 4 : -32
                                fp["glow"].zoom_x -= 0.02*fp["glow"].toggle
                                fp["glow"].zoom_y -= 0.02*fp["glow"].toggle
                                fp["glow"].toggle *= -1 if i%4 == 0
                              end
                              pbSEPlay("eb_move2") if i == 132
                              pbSEPlay("eb_normal5",80) if i == 132
                              # shooting at the target
                              @vector.set(getRealVector(targetindex,player2)) if i == 132
                              fp["circle"].z = targetsprite.z + 1 if i == 132
                              fp["circle1"].z = targetsprite.z + 1 if i == 132
                              fp["circle2"].z = targetsprite.z + 1 if i == 132
                              if i >= 132
                                cx, cy = getCenter(usersprite,true)
                                x1, y1 = getCenter(targetsprite,true)
                                fp["ripples"].opacity += i < 140 ? 32 : - 32
                                fp["ripples"].zoom_x += 0.1*usersprite.zoom_x
                                fp["ripples"].zoom_y += 0.1*usersprite.zoom_y
                                fp["ripples"].color.alpha += 16
                                fp["ripples"].x = cx
                                fp["ripples"].y = cy
                                fp["circle"].color.alpha = 0
                                fp["circle"].zoom_x = @vector.zoom1
                                fp["circle"].zoom_y = @vector.zoom1
                                fp["circle"].x += (x1 - fp["circle"].x)*0.1
                                fp["circle"].y -= (fp["circle"].y - y1)*0.1
                                fp["circle"].opacity -= 64 if i >= 144
                                fp["circle1"].color.alpha = 0
                                fp["circle1"].zoom_x = @vector.zoom1
                                fp["circle1"].zoom_y = @vector.zoom1
                                fp["circle1"].x += (x1 - fp["circle1"].x)*0.1
                                fp["circle1"].y -= (fp["circle1"].y - y1)*0.1
                                fp["circle1"].opacity -= 64 if i >= 144
                                fp["circle2"].color.alpha = 0
                                fp["circle2"].zoom_x = @vector.zoom1
                                fp["circle2"].zoom_y = @vector.zoom1
                                fp["circle2"].x += (x1 - fp["circle2"].x)*0.1
                                fp["circle2"].y -= (fp["circle2"].y - y1)*0.1
                                fp["circle2"].opacity -= 64 if i >= 144
                              end
                              wait(1,true)
                            end
                            pbSEPlay("eb_iron4")
                            pbSEPlay("eb_iron1")
                            # hitting the target
                            for j in 0...24
                              fp["r2#{j}"] = Sprite.new(targetsprite.viewport)
                              fp["r2#{j}"].bitmap = pbBitmap("Graphics/Animations/eb540_3")
                              fp["r2#{j}"].center
                              fp["r2#{j}"].x = targetsprite.x - targetsprite.ox + rand(targetsprite.bitmap.width)
                              fp["r2#{j}"].y = targetsprite.y - targetsprite.oy + rand(targetsprite.bitmap.height)
                              fp["r2#{j}"].z = targetsprite.z + 1 + rand(2)
                              fp["r2#{j}"].visible = false
                            end
                            for j in 0...32
                              fp["r#{j}"] = Sprite.new(targetsprite.viewport)
                              b = rand(2)
                              fp["r#{j}"].bitmap = pbBitmap("Graphics/Animations/eb519_11")
                              fp["r#{j}"].center
                              fp["r#{j}"].ox /= 2
                              fp["r#{j}"].src_rect.set(rand(2)*fp["r#{j}"].bitmap.width/2,0,fp["r#{j}"].bitmap.width/2,fp["r#{j}"].bitmap.height)
                              fp["r#{j}"].x = x1
                              fp["r#{j}"].y = y1
                              r = (48 + rand(49))*targetsprite.zoom_x
                              rx, ry = randCircleCord(r)
                              fp["r#{j}"].end_x = x1 - r + rx
                              fp["r#{j}"].end_y = y1 - r + ry
                              fp["r#{j}"].opacity = 0
                              fp["r#{j}"].toggle = 2
                              fp["r#{j}"].z = targetsprite.z + 1
                              fp["r#{j}"].zoom_x = targetsprite.zoom_x
                              fp["r#{j}"].zoom_y = targetsprite.zoom_y
                              fp["r#{j}"].param = 0
                              fp["r#{j}"].speed = rand(15)
                            end
                            k = 1
                            for i in 0...64
                              for j in 0...32
                                #next if j > i
                                fp["r#{j}"].opacity += 16*fp["r#{j}"].toggle
                                fp["r#{j}"].toggle = -4 if fp["r#{j}"].param >= 24+fp["r#{j}"].speed
                                fp["r#{j}"].x += (fp["r#{j}"].end_x - fp["r#{j}"].x)*0.05
                                fp["r#{j}"].y += (fp["r#{j}"].end_y - fp["r#{j}"].y)*0.05
                                fp["r#{j}"].zoom_x -= fp["r#{j}"].zoom_x*0.02
                                fp["r#{j}"].zoom_y -= fp["r#{j}"].zoom_y*0.02
                                fp["r#{j}"].param += 1
                              end
                              for j in 0...24
                                next if i < 8
                                next if j > (i-8)/2
                                fp["r2#{j}"].visible = true
                                fp["r2#{j}"].opacity -= 24
                                fp["r2#{j}"].zoom_x -= 0.02
                                fp["r2#{j}"].zoom_y -= 0.02
                              end
                              if i >= 24
                                targetsprite.ox += k*2
                                k *= -1 if i%2 == 0
                                pbSEPlay("eb_normal2",50) if i%4 == 0
                              end
                              targetsprite.still
                              wait(1)
                            end
                            @vector.set(defaultvector)
                            for key in fp.keys
                              next if key == "bg"
                              fp[key].dispose
                            end
                            16.times do
                              fp["bg"].opacity -= 16
                              wait(1,true)
                            end
                            fp["bg"].dispose
                            fp.clear
                            return true
                          end


                        Pay attention about img name and rename (script nor folder) them into your game.

                        In Action:
                        Reply With Quote
                          #12   Link to this post, but load the entire thread.  
                        Old 4 Weeks Ago (10:24 PM). Edited 4 Weeks Ago by WolfPP.
                        WolfPP's Avatar
                        WolfPP WolfPP is online now
                           
                          Join Date: Aug 2018
                          Location: Brazil
                          Gender: Male
                          Nature: Jolly
                          Posts: 170
                          Dig (move animation n225 in move.txt):
                          Spoiler:

                          Code:
                            #-----------------------------------------------------------------------------
                            #  Dig
                            #-----------------------------------------------------------------------------
                            def pbMoveAnimationSpecific225(userindex,targetindex,hitnum=0,multihit=false)
                              if hitnum == 1
                                return moveAnimationDigDown(userindex,targetindex)
                              elsif hitnum == 0
                                return moveAnimationDigUp(userindex,targetindex)
                              end
                            end
                          
                            def moveAnimationDigDown(userindex,targetindex)
                              # inital configuration
                              usersprite = @sprites["pokemon#{userindex}"]
                              targetsprite = @sprites["pokemon#{targetindex}"]
                              player = (userindex%2==0)
                              defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
                              vector = getRealVector(userindex,player)
                              factor = player ? 2 : 1.5
                              # set up animation
                              fp = {}
                              randx = []
                              randy = []
                              speed = []
                              angle = []
                              for m in 0...4
                                randx.push([]); randy.push([]); speed.push([]); angle.push([])
                                  targetsprite = @sprites["pokemon#{m}"]
                                  next if !usersprite || usersprite.disposed? || usersprite.fainted || !usersprite.visible
                                next if m == userindex
                                for j in 0...32
                                  fp["#{j}#{m}"] = Sprite.new(usersprite.viewport)
                                  fp["#{j}#{m}"].bitmap = pbBitmap("Graphics/Animations/eb223")
                                  fp["#{j}#{m}"].ox = fp["#{j}#{m}"].bitmap.width/2
                                  fp["#{j}#{m}"].oy = fp["#{j}#{m}"].bitmap.height/2
                                  fp["#{j}#{m}"].z = 50
                                  z = [0.5,0.4,0.3,0.7][rand(4)]
                                  fp["#{j}#{m}"].zoom_x = z
                                  fp["#{j}#{m}"].zoom_y = z
                                  fp["#{j}#{m}"].visible = false
                                  randx[m].push(rand(82)+(rand(2)==0 ? 82 : 0))
                                  randy[m].push(rand(32)+32)
                                  speed[m].push(4)
                                  angle[m].push((rand(8)+1)*(rand(2)==0 ? -1 : 1))
                                end
                              end
                              # start animation
                              @vector.set(vector)
                              wait(20,true)
                              factor = usersprite.zoom_x
                              k = -1
                          #
                              pbSEPlay("#{SE_EXTRA_PATH}Earth4")
                              for i in 0...92
                                for m in 0...4
                                targetsprite = @sprites["pokemon#{m}"]
                                next if !usersprite || usersprite.disposed? || usersprite.fainted || !usersprite.visible
                                  next if m == userindex
                                  cx, cy = getCenter(usersprite,true)
                                  for j in 0...32
                                    next if j>(i/2)
                                    if !fp["#{j}#{m}"].visible
                                      fp["#{j}#{m}"].visible = true
                                      fp["#{j}#{m}"].x = cx - 82*usersprite.zoom_x + randx[m][j]*usersprite.zoom_x
                                      fp["#{j}#{m}"].y = usersprite.y
                                      fp["#{j}#{m}"].zoom_x *= usersprite.zoom_x
                                      fp["#{j}#{m}"].zoom_y *= usersprite.zoom_y
                                    end
                                    fp["#{j}#{m}"].y -= speed[m][j]*2*usersprite.zoom_y
                                    speed[m][j] *= -1 if (fp["#{j}#{m}"].y <= usersprite.y - randy[m][j]*usersprite.zoom_y) || (fp["#{j}#{m}"].y >= usersprite.y)
                                    fp["#{j}#{m}"].opacity -= 35 if speed[m][j] < 0
                                    fp["#{j}#{m}"].angle += angle[m][j]
                                  end
                                end
                                usersprite.zoom_x -= 0.2/6 if usersprite.zoom_x > factor
                                usersprite.zoom_y += 0.2/6 if usersprite.zoom_y < factor
                                
                                k *= -1 if i%3==0
                                if i%32==0
                                  pbSEPlay("#{SE_EXTRA_PATH}Earth4",60)
                                  usersprite.zoom_x = factor*1.2
                                  usersprite.zoom_y = factor*0.8
                                end
                                wait(1,false)
                              end
                              usersprite.visible = false
                              usersprite.hidden = true
                              pbDisposeSpriteHash(fp)
                              @vector.set(defaultvector)
                              wait(20,true)
                              return true
                            end
                            
                            def moveAnimationDigUp(userindex,targetindex)
                              # inital configuration
                              usersprite = @sprites["pokemon#{userindex}"]
                              targetsprite = @sprites["pokemon#{targetindex}"]
                              player = (targetindex%2==0)
                              itself = (userindex==targetindex)
                              defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
                              vector = getRealVector(targetindex,player)
                              factor = targetsprite.zoom_x
                              #factor = player ? 2 : 1.5
                              @vector.set(getRealVector(targetindex,player))
                              wait(16,true)
                              # set up animation
                              fp = {}
                              rndx = []
                              rndy = []
                              for i in 0...16
                                fp["#{i}"] = Sprite.new(targetsprite.viewport)
                                fp["#{i}"].bitmap = pbBitmap("Graphics/Animations/eb024")
                                fp["#{i}"].ox = 6
                                fp["#{i}"].oy = 6
                                fp["#{i}"].opacity = 0
                                fp["#{i}"].z = 50
                                r = rand(3)
                                fp["#{i}"].zoom_x = (targetsprite.zoom_x)*(r==0 ? 1 : 0.5)
                                fp["#{i}"].zoom_y = (targetsprite.zoom_y)*(r==0 ? 1 : 0.5)
                                fp["#{i}"].tone = Tone.new(60,60,60)
                                rndx.push(rand(128))
                                rndy.push(rand(128))
                              end
                              factor = 1
                              frame = Sprite.new(targetsprite.viewport)
                              frame.z = 50
                              frame.bitmap = pbBitmap("Graphics/Animations/eb520")
                              frame.src_rect.set(0,0,114,114)
                              frame.ox = 57
                              frame.oy = 57
                              frame.zoom_x = 0.5*factor
                              frame.zoom_y = 0.5*factor
                              frame.x, frame.y = getCenter(targetsprite,true)
                              frame.opacity = 0
                              frame.tone = Tone.new(255,255,255)
                              # start animation
                              for i in 1..30
                                if i == 6
                                  pbSEPlay("Earth3",90)
                                  pbSEPlay("Earth5",80)
                                end
                                if i.between?(1,5)
                                  targetsprite.still
                                  targetsprite.zoom_y-=0.05*factor
                                  targetsprite.toneAll(-12.8)
                                  frame.zoom_x += 0.1*factor
                                  frame.zoom_y += 0.1*factor
                                  frame.opacity += 51
                                end
                                frame.tone = Tone.new(0,0,0) if i == 6
                                if i.between?(6,10)
                                  targetsprite.still
                                  targetsprite.zoom_y+=0.05*factor
                                  targetsprite.toneAll(+12.8)
                                  frame.angle += 2
                                end
                                frame.src_rect.x = 114 if i == 10
                                if i >= 10
                                  frame.opacity -= 25.5
                                  frame.zoom_x += 0.1*factor
                                  frame.zoom_y += 0.1*factor
                                  frame.angle += 2
                                end
                                for j in 0...16
                                  next if i < 6
                                  cx = frame.x; cy = frame.y
                                  if fp["#{j}"].opacity == 0 && fp["#{j}"].visible
                                    fp["#{j}"].x = cx
                                    fp["#{j}"].y = cy
                                  end
                                  x2 = cx - 64*targetsprite.zoom_x + rndx[j]*targetsprite.zoom_x
                                  y2 = cy - 64*targetsprite.zoom_y + rndy[j]*targetsprite.zoom_y
                                  x0 = fp["#{j}"].x
                                  y0 = fp["#{j}"].y
                                  fp["#{j}"].x += (x2 - x0)*0.2
                                  fp["#{j}"].y += (y2 - y0)*0.2
                                  fp["#{j}"].zoom_x += 0.01
                                  fp["#{j}"].zoom_y += 0.01
                                  fp["#{j}"].angle += 2
                                  if i < 20
                                    fp["#{j}"].tone.red -= 6; fp["#{j}"].tone.blue -= 6; fp["#{j}"].tone.green -= 6
                                  end
                                  if (x2 - x0)*0.2 < 1 && (y2 - y0)*0.2 < 1
                                    fp["#{j}"].opacity -= 51
                                  else
                                    fp["#{j}"].opacity += 51
                                  end
                                  fp["#{j}"].visible = false if fp["#{j}"].opacity <= 0
                                end
                                wait(1)
                              end
                              usersprite.hidden = false
                              usersprite.visible = true
                              frame.dispose
                              pbDisposeSpriteHash(fp)
                              @vector.set(defaultvector)
                              return true
                            end


                          In Action:
                          Reply With Quote
                            #13   Link to this post, but load the entire thread.  
                          Old 4 Weeks Ago (8:28 AM). Edited 4 Weeks Ago by WolfPP.
                          WolfPP's Avatar
                          WolfPP WolfPP is online now
                             
                            Join Date: Aug 2018
                            Location: Brazil
                            Gender: Male
                            Nature: Jolly
                            Posts: 170
                            Bounce (move animation n157 in move.txt):
                            Spoiler:

                            Code:
                              #-----------------------------------------------------------------------------
                              #  Bounce
                              #-----------------------------------------------------------------------------
                              def pbMoveAnimationSpecific157(userindex,targetindex,hitnum=0,multihit=false)
                                if hitnum == 1
                                  return moveAnimationBounceUp(userindex,targetindex)
                                elsif hitnum == 0
                                  return moveAnimationBounceDown(userindex,targetindex)
                                end
                              end
                              
                              def moveAnimationBounceUp(userindex,targetindex)
                                # inital configuration
                                usersprite = @sprites["pokemon#{userindex}"]
                                targetsprite = @sprites["pokemon#{targetindex}"]
                                player = (userindex%2==0)
                                defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
                                vector = getRealVector(userindex,player)
                                factor = player ? 2 : 1.5
                                # set up animation
                                fp = {}
                                fp["fly"] = Sprite.new(usersprite.viewport)
                                fp["fly"].bitmap = pbBitmap("Graphics/Animations/eb157")
                                fp["fly"].ox = fp["fly"].bitmap.width/2
                                fp["fly"].oy = fp["fly"].bitmap.height/2
                                fp["fly"].z = 50
                                fp["fly"].x, fp["fly"].y = getCenter(usersprite)
                                fp["fly"].opacity = 0
                                fp["fly"].zoom_x = factor*1.4
                                fp["fly"].zoom_y = factor*1.4
                                # start animation
                                @vector.set(vector)
                                wait(20,true)
                                pbSEPlay("#{SE_EXTRA_PATH}Refresh")
                                for i in 0...20
                                  cx, cy = getCenter(usersprite)
                                  fp["fly"].x = cx
                                  fp["fly"].y = cy
                                  fp["fly"].zoom_x -= factor*0.4/10
                                  fp["fly"].zoom_y -= factor*0.4/10
                                  fp["fly"].opacity += 51
                                  usersprite.visible = false if i == 6
                                  usersprite.hidden = true if i == 6
                                  wait(1,true)
                                end
                                10.times do
                                  fp["fly"].zoom_x += factor*0.4/10
                                  fp["fly"].zoom_y += factor*0.4/10
                                  wait(1,true)
                                end
                                @vector.set(vector[0],vector[1]+196,vector[2],vector[3],vector[4],vector[5])
                                for i in 0...20
                                  wait(1,true)
                                  cx, cy = getCenter(usersprite)
                                  if i < 10
                                    fp["fly"].zoom_y -= factor*0.02
                                  elsif
                                    fp["fly"].zoom_x -= factor*0.02
                                    fp["fly"].zoom_y += factor*0.04
                                  end
                                  fp["fly"].x = cx
                                  fp["fly"].y = cy
                                  fp["fly"].y -= 32*(i-10) if i >= 10
                                  pbSEPlay("eb_flying2") if i == 10
                                end
                                for i in 0...20
                                  fp["fly"].y -= 32
                                  fp["fly"].opacity -= 25.5 if i >= 10
                                  wait(1,true)
                                end
                                pbDisposeSpriteHash(fp)
                                @vector.set(defaultvector)
                                wait(20,true)
                                return true
                              end
                              
                              def moveAnimationBounceDown(userindex,targetindex)
                                # inital configuration
                                usersprite = @sprites["pokemon#{userindex}"]
                                targetsprite = @sprites["pokemon#{targetindex}"]
                                player = (targetindex%2==0)
                                defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
                                vector = getRealVector(targetindex,player)
                                factor = player ? 2 : 1.5
                                # set up animation
                                fp = {}
                                fp["drop"] = Sprite.new(targetsprite.viewport)
                                fp["drop"].bitmap = pbBitmap("Graphics/Animations/eb157_2")
                                fp["drop"].ox = fp["drop"].bitmap.width/2
                                fp["drop"].oy = fp["drop"].bitmap.height/2
                                fp["drop"].y = 0
                                fp["drop"].z = 50
                                fp["drop"].visible = false
                                # start animation
                                @vector.set(vector)
                                maxy = ((player ? @vector.y : @vector.y2)*0.1).ceil*10 - 80
                                fp["drop"].y = -((maxy-(player ? @vector.y-80 : @vector.y2-80))*0.1).ceil*10
                                fp["drop"].x = targetsprite.x
                                pbSEPlay("#{SE_EXTRA_PATH}Wind1")
                                for i in 0...20
                                  wait(1,true)
                                  if i >= 10
                                    fp["drop"].visible = true
                                    fp["drop"].x = targetsprite.x
                                    fp["drop"].y += maxy/10
                                    fp["drop"].zoom_x = targetsprite.zoom_x
                                    fp["drop"].zoom_y = targetsprite.zoom_y*1.4
                                  end
                                end
                                usersprite.hidden = false
                                usersprite.visible = true
                                pbDisposeSpriteHash(fp)
                                return pbMoveAnimationSpecific303(userindex,targetindex,0,false,false,true)
                              end


                            In Action:
                            Attached Images
                            File Type: png eb157.png‎ (2.0 KB, 100 views) (Save to Dropbox)
                            File Type: png eb157_2.png‎ (1.4 KB, 102 views) (Save to Dropbox)
                            Reply With Quote
                              #14   Link to this post, but load the entire thread.  
                            Old 4 Weeks Ago (5:23 PM).
                            WolfPP's Avatar
                            WolfPP WolfPP is online now
                               
                              Join Date: Aug 2018
                              Location: Brazil
                              Gender: Male
                              Nature: Jolly
                              Posts: 170
                              Water Shuriken (move animation n609 in move.txt):
                              Spoiler:

                              Code:
                                #-----------------------------------------------------------------------------
                                #  Water Shuriken
                                #-----------------------------------------------------------------------------
                                def pbMoveAnimationSpecific609(userindex,targetindex,hitnum=0,multihit=false)
                                  # inital configuration
                                  usersprite = @sprites["pokemon#{userindex}"]
                                  targetsprite = @sprites["pokemon#{targetindex}"]
                                  player = (targetindex%2==0)
                                  player2 = (userindex%2==0)
                                  defaultvector = @battle.doublebattle ? VECTOR2 : VECTOR1
                                  vector = getRealVector(targetindex,player)
                                  vector2 = getRealVector(userindex,player2)
                                  # set up animation
                                  fp = {}
                                  rndx = []; prndx = []
                                  rndy = []; prndy = []
                                  rangl = []
                                  dx = []
                                  dy = []   
                                  # start animation
                                  for i in 0...40
                                    if i == 8 
                                      @vector.set(vector2)
                                    elsif i == 30
                                      pbSEPlay("#{SE_EXTRA_PATH}Water3",80)
                                    end
                                    wait(1,true)
                                  end
                                  cx, cy = getCenter(usersprite,true)
                                  dx = []
                                  dy = []
                                  for i in 0...8
                                    fp["#{i}s"] = Sprite.new(targetsprite.viewport)
                                    fp["#{i}s"].bitmap = pbBitmap("Graphics/Animations/eb093_2")
                                    fp["#{i}s"].src_rect.set(rand(3)*36,0,36,36)
                                    fp["#{i}s"].ox = fp["#{i}s"].src_rect.width/2
                                    fp["#{i}s"].oy = fp["#{i}s"].src_rect.height/2
                                    r = 128*usersprite.zoom_x
                                    z = [0.5,0.25,1,0.75][rand(4)]
                                    x, y = randCircleCord(r)
                                    x = cx - r + x
                                    y = cy - r + y
                                    fp["#{i}s"].x = cx
                                    fp["#{i}s"].y = cy
                                    fp["#{i}s"].zoom_x = z*usersprite.zoom_x
                                    fp["#{i}s"].zoom_y = z*usersprite.zoom_x
                                    fp["#{i}s"].visible = false
                                    fp["#{i}s"].z = usersprite.z + 1
                                    dx.push(x)
                                    dy.push(y)
                                  end
                                  
                                  fp["shot"] = Sprite.new(targetsprite.viewport)
                                  fp["shot"].bitmap = pbBitmap("Graphics/Animations/eb609")
                                  fp["shot"].ox = fp["shot"].bitmap.width/2
                                  fp["shot"].oy = fp["shot"].bitmap.height/2
                                  fp["shot"].z = usersprite.z + 1
                                  fp["shot"].zoom_x = usersprite.zoom_x
                                  fp["shot"].zoom_y = usersprite.zoom_x
                                  fp["shot"].opacity = 0
                                  
                                  x = defaultvector[0]; y = defaultvector[1]
                                  x2, y2 = @vector.spoof(defaultvector)
                                  fp["shot"].x = cx
                                  fp["shot"].y = cy
                                  wait(1,true)
                                  for i in 0...20
                                    cx, cy = getCenter(usersprite)
                                    @vector.set(defaultvector) if i == 0
                                    if i > 0
                                      fp["shot"].angle = Math.atan(1.0*(@vector.y-@vector.y2)/(@vector.x2-@vector.x))*(180.0/Math::PI) + (player ? 180 : 0)
                                      fp["shot"].opacity += 32
                                      fp["shot"].zoom_x -= (fp["shot"].zoom_x - targetsprite.zoom_x)*0.1
                                      fp["shot"].zoom_y -= (fp["shot"].zoom_y - targetsprite.zoom_y)*0.1
                                      fp["shot"].x += (player ? -1 : 1)*(x2 - x)/42
                                      fp["shot"].y -= (player ? -1 : 1)*(y - y2)/42
                                      for j in 0...8
                                        fp["#{j}s"].visible = true
                                        fp["#{j}s"].opacity -= 32
                                        fp["#{j}s"].x -= (fp["#{j}s"].x - dx[j])*0.2
                                        fp["#{j}s"].y -= (fp["#{j}s"].y - dy[j])*0.2
                                      end
                                    end
                                    factor = targetsprite.zoom_x if i == 12
                                    cx, cy = getCenter(targetsprite,true)
                                    if !player
                                      fp["shot"].z = targetsprite.z - 1 if fp["shot"].x > cx && fp["shot"].y < cy
                                    else
                                      fp["shot"].z = targetsprite.z + 1 if fp["shot"].x < cx && fp["shot"].y > cy
                                    end
                                    wait(1,i < 12)
                                  end
                                  16.times do
                                    fp["shot"].angle = Math.atan(1.0*(@vector.y-@vector.y2)/(@vector.x2-@vector.x))*(180.0/Math::PI) + (player ? 180 : 0)
                                    fp["shot"].opacity += 32
                                    fp["shot"].zoom_x -= (fp["shot"].zoom_x - targetsprite.zoom_x)*0.1
                                    fp["shot"].zoom_y -= (fp["shot"].zoom_y - targetsprite.zoom_y)*0.1
                                    fp["shot"].x += (player ? -1 : 1)*(x2 - x)/42
                                    fp["shot"].y -= (player ? -1 : 1)*(y - y2)/42
                                    fp["shot"].opacity -= 56
                                  end
                                  fp["frame"] = Sprite.new(targetsprite.viewport)
                                  fp["frame"].z = targetsprite.z + 2
                                  fp["frame"].bitmap = pbBitmap("Graphics/Animations/eb540")
                                  fp["frame"].src_rect.set(0,0,64,64)
                                  fp["frame"].ox = 32
                                  fp["frame"].oy = 32
                                  fp["frame"].zoom_x = 0.5*targetsprite.zoom_x
                                  fp["frame"].zoom_y = 0.5*targetsprite.zoom_y
                                  fp["frame"].x, fp["frame"].y = getCenter(targetsprite,true)
                                  fp["frame"].opacity = 0
                                  fp["frame"].tone = Tone.new(255,255,255)
                                  px = []
                                  py = []
                                  for i in 0...24
                                    fp["p#{i}"] = Sprite.new(targetsprite.viewport)
                                    fp["p#{i}"].bitmap = Bitmap.new(16,16)
                                    fp["p#{i}"].bitmap.drawCircle
                                    fp["p#{i}"].ox = 8
                                    fp["p#{i}"].oy = 8
                                    fp["p#{i}"].opacity = 0
                                    fp["p#{i}"].z = targetsprite.z
                                    px.push(0)
                                    py.push(0)
                                  end
                                  for i in 0...64
                                    pbSEPlay("Water1",80) if i == 11
                                    if i.between?(11,15)
                                      targetsprite.still
                                      targetsprite.zoom_y-=0.05*targetsprite.zoom_y
                                      targetsprite.toneAll(-12.8)
                                      fp["frame"].zoom_x += 0.1*targetsprite.zoom_x
                                      fp["frame"].zoom_y += 0.1*targetsprite.zoom_y
                                      fp["frame"].opacity += 51
                                    end
                                    fp["frame"].tone = Tone.new(0,0,0) if i == 16
                                    if i.between?(16,20)
                                      targetsprite.still
                                      targetsprite.zoom_y+=0.05*targetsprite.zoom_y
                                      targetsprite.toneAll(+12.8)
                                      fp["frame"].angle += 2
                                    end
                                    fp["p#{i}"].src_rect.x = 64 if i == 10
                                    if i >= 20
                                      fp["frame"].opacity -= 25.5
                                      fp["frame"].zoom_x += 0.1*targetsprite.zoom_x
                                      fp["frame"].zoom_y += 0.1*targetsprite.zoom_y
                                      fp["frame"].angle += 2
                                    end      
                                    for l in 0...24
                                      next if i < 10
                                      next if l>((i-10)*8)
                                      cx, cy = getCenter(targetsprite,true)
                                      if fp["p#{l}"].opacity <= 0 && fp["p#{l}"].tone.blue <= 0
                                        fp["p#{l}"].opacity = 255 - rand(101)
                                        fp["p#{l}"].x = cx
                                        fp["p#{l}"].y = cy
                                        r = rand(2)
                                        fp["p#{l}"].zoom_x = r==0 ? 1 : 0.5
                                        fp["p#{l}"].zoom_y = r==0 ? 1 : 0.5
                                        x = rand(128); y = rand(128)
                                        px[l] = cx - 64*targetsprite.zoom_x + x*targetsprite.zoom_x
                                        py[l] = cy - 64*targetsprite.zoom_y + y*targetsprite.zoom_y
                                      end
                                      x2 = px[l]
                                      y2 = py[l]
                                      x0 = fp["p#{l}"].x
                                      y0 = fp["p#{l}"].y
                                      fp["p#{l}"].x += (x2 - x0)*0.1
                                      fp["p#{l}"].y += (y2 - y0)*0.1
                                      fp["p#{l}"].opacity -= 8
                                      fp["p#{l}"].tone.blue = 1 if fp["p#{l}"].opacity <= 0
                                    end
                                    wait(1)
                                  end
                                  @vector.set(defaultvector)
                                  pbDisposeSpriteHash(fp)
                                  return true
                                end
                              Attached Images
                              File Type: png eb609.png‎ (3.4 KB, 88 views) (Save to Dropbox)
                              Reply With Quote
                              Reply

                              Quick Reply

                              Join the conversation!

                              Create an account to post a reply in this thread, participate in other discussions, and more!

                              Create a PokéCommunity Account
                              Ad Content
                              Thread Tools

                              Posting Rules
                              You may not post new threads
                              You may not post replies
                              You may not post attachments
                              You may not edit your posts

                              BB code is On
                              Smilies are On
                              [IMG] code is On
                              HTML code is Off

                              Forum Jump


                              All times are GMT -8. The time now is 4:31 AM.