Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Draconius GO
Reply
 
Thread Tools
  #1    
Old April 7th, 2013 (2:00 PM).
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
     
    Join Date: Dec 2011
    Gender: Male
    Posts: 647
    I have another quick question. I want to call a script that will make the game zoom in on the player, and then another one that will zoom back out. I want it to be a gradual change like when you use
    Code:
    pbToneChangeAll(0,20)
    where the 0 is the tone it fades to and 20 is the frames it takes to do it. Is there something like this to zoom in on the player in the over world?
    __________________
    Reply With Quote

    Relevant Advertising!

      #2    
    Old April 7th, 2013 (2:08 PM).
    Maruno's Avatar
    Maruno Maruno is offline
    Lead Dev of Pokémon Essentials
       
      Join Date: Jan 2008
      Location: England
      Posts: 5,189
      You mean like the battle transition which zooms in on the screen? Class ZoomInTransition is where to get started with that, although what you need depends a huge amount on what you want to do with this zooming.
      __________________
      Go to the Pokémon Essentials Wiki

      | Downloads | Tutorials | Fangames |
      | All Animations Project |

      Follow me on Twitter: @maruno42


      Reply With Quote
        #3    
      Old April 7th, 2013 (3:10 PM).
      Rayd12smitty's Avatar
      Rayd12smitty Rayd12smitty is offline
      Shadow Maker
         
        Join Date: Dec 2011
        Gender: Male
        Posts: 647
        Quote:
        Originally Posted by Maruno View Post
        You mean like the battle transition which zooms in on the screen? Class ZoomInTransition is where to get started with that, although what you need depends a huge amount on what you want to do with this zooming.
        Yes thats exactly what I want. I want to make it so the player is zoomed in on like that when I select something in the menu. I am using a custom menu so I don't need to know how to edit that.
        Code:
        if Input.trigger?(Input::C)
                  Audio.se_play("Audio/SE/Select")
                  pbWait(2)
                  10.times do
                    if $Trainer.pokedex==true
                      @sprites["Pokedex"].y-=16
                    end
                    if $Trainer.party.length>=1
                      @sprites["Pokemon"].y-=16
                    end
                    if $Trainer.pokegear==true
                      @sprites["Pokegear"].y-=16
                    end
                    @sprites["Bag"].y-=16
                    @sprites["Trainer Card"].y+=25.5
                    @sprites["Save"].y+=25.5
                    @sprites["Options"].y+=25.5
                    @sprites["Back"].y+=25.5
                    pbWait(1)
                  end
                  ####ZOOM IN ON PLAYER
                  Audio.se_play("Audio/SE/navopen")
                  pbPokeDev
                  ####ZOOM OUT ON PLAYER
                  break
                end

        This is the basic idea I had. The commented out parts would be zooming in and then when you close the thing in the menu it zooms back out to normal. I will take just about anything I can get. It doesn't have to show it zoom back out if thats not possible.
        __________________
        Reply With Quote
          #4    
        Old April 7th, 2013 (6:24 PM).
        zingzags's Avatar
        zingzags zingzags is offline
        PokemonGDX creator
           
          Join Date: Jan 2009
          Location: Boston
          Age: 23
          Nature: Adamant
          Posts: 562
          Zooming in on player is basically enlarging the map, and the player. The effect you are looking for is to make a loop which will gradually zoom in until it reaches the desired enlargement point.
          __________________
          Check out the Pokemon Game Engine I am working on:
          https://github.com/sjosegarcia/Pokemon
          Reply With Quote
            #5    
          Old April 7th, 2013 (6:28 PM).
          Rayd12smitty's Avatar
          Rayd12smitty Rayd12smitty is offline
          Shadow Maker
             
            Join Date: Dec 2011
            Gender: Male
            Posts: 647
            I understand that but I don't know what to put in the loop. I don't know the script XD
            __________________
            Reply With Quote
              #6    
            Old April 8th, 2013 (6:48 AM). Edited April 8th, 2013 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: 24
              Gender: Male
              Nature: Adamant
              Posts: 1,106
              Quote:
              Originally Posted by zingzags View Post
              Zooming in on player is basically enlarging the map, and the player. The effect you are looking for is to make a loop which will gradually zoom in until it reaches the desired enlargement point.
              That is not a good way to do it. First of all it's much more complicated. Second, if you are actually enlarging the map, you'll be enlarging it tile by tile, making them out of alignment at points which aren't perfectly divisible by the scale factor. I tried this method; it's complicated, and doesn't give you a smooth animation in return.
              Quote:
              Originally Posted by Rayd12smitty View Post
              I understand that but I don't know what to put in the loop. I don't know the script XD
              Maruno gave you everything you need. If you look at how the class ZoomInTransition actually works, you'll see that it uses the Graphics.snap_to_bitmap function, which basically creates a temporary screenshot of your screen. Create a sprite with that, and you have yourself a super easy method of creating transitions of all kinds.
              __________________

              Reply With Quote
                #7    
              Old April 8th, 2013 (10:19 AM).
              Rayd12smitty's Avatar
              Rayd12smitty Rayd12smitty is offline
              Shadow Maker
                 
                Join Date: Dec 2011
                Gender: Male
                Posts: 647
                Thanks Luka...again haha. I'll look at it again.
                __________________
                Reply With Quote
                  #8    
                Old April 9th, 2013 (3:56 PM).
                zingzags's Avatar
                zingzags zingzags is offline
                PokemonGDX creator
                   
                  Join Date: Jan 2009
                  Location: Boston
                  Age: 23
                  Nature: Adamant
                  Posts: 562
                  Quote:
                  Originally Posted by Luka S.J. View Post
                  That is not a good way to do it. First of all it's much more complicated. Second, if you are actually enlarging the map, you'll be enlarging it tile by tile, making them out of alignment at points which aren't perfectly divisible by the scale factor. I tried this method; it's complicated, and doesn't give you a smooth animation in return.

                  Maruno gave you everything you need. If you look at how the class ZoomInTransition actually works, you'll see that it uses the Graphics.snap_to_bitmap function, which basically creates a temporary screenshot of your screen. Create a sprite with that, and you have yourself a super easy method of creating transitions of all kinds.
                  I was talking in theory, never really tried it myself.
                  __________________
                  Check out the Pokemon Game Engine I am working on:
                  https://github.com/sjosegarcia/Pokemon
                  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

                  Sponsored Links
                  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 6:11 PM.