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 August 24th, 2012 (2:31 AM).
Pharetra's Avatar
Pharetra Pharetra is offline
zzzz
     
    Join Date: Jun 2011
    Age: 21
    Gender: Male
    Posts: 455
    I've made a nice (if I may say so) Title Screen with 96 frames and I'd like to use it. Problem is, it doesn't work. .Gif files won't work and I've tried renaming the file to splash.png (changing the extension) without succes.

    What is the best way to do this? I do not have much knowledge of RGSS, so...
    Reply With Quote

    Relevant Advertising!

      #2    
    Old August 24th, 2012 (8:42 AM).
    zingzags's Avatar
    zingzags zingzags is offline
    PokemonGDX creator
       
      Join Date: Jan 2009
      Location: Boston
      Age: 23
      Nature: Adamant
      Posts: 562
      Making an image for each 96 frames name them some thing like splash_1,_2,_3, and etc... then make a global variable it can be anything like
      Code:
      @splash=0
      then once you start looping
      Code:
       
      @splash+=1
      this makes it so it can play each frames
      then
      Code:
      @splash=1 if @splash==96
      once it hits 96 it starts the animation again from frame one.
      when you are going to make the splash images show do something like this
      Code:
      ("Graphics/Pictures/splash_"[email protected])
      But gif images should work, when they are renamed to png.
      __________________
      Check out the Pokemon Game Engine I am working on:
      https://github.com/sjosegarcia/Pokemon
      Reply With Quote
        #3    
      Old August 24th, 2012 (9:40 AM).
      Pharetra's Avatar
      Pharetra Pharetra is offline
      zzzz
         
        Join Date: Jun 2011
        Age: 21
        Gender: Male
        Posts: 455
        I suppose these lines of code have to be added to the script Intro_Scene?
        I've got this so far:
        Spoiler:

        class IntroEventScene < EventScene
        def initialize(pics,splash,viewport=nil)
        super(nil)
        @pics=pics
        @splash=splash
        @pic=addImage(0,0,"")
        @pic.moveOpacity(0,0,0) # fade to opacity 0 in 0 frames after waiting 0 frames
        @pic2=addImage(0,322,"") # flashing "Press Enter" picture
        @pic2.moveOpacity(0,0,0)
        @index=0
        data_system = pbLoadRxData("Data/System")
        pbBGMPlay(data_system.title_bgm)
        openPic(self,nil)
        end

        def openPic(scene,args)
        onCTrigger.clear
        @pic.name="Graphics/Titles/"[email protected][@index]
        @pic.moveOpacity(15,0,255) # fade to opacity 255 in 15 frames after waiting 0 frames
        pictureWait
        @timer=0 # reset the timer
        onUpdate.set(method(:timer)) # call timer every frame
        onCTrigger.set(method(:closePic)) # call closePic when C key is pressed
        end

        def timer(scene,args)
        @timer+=1
        if @timer>80
        @timer=0
        closePic(scene,args) # Close the picture
        end
        end

        def closePic(scene,args)
        onCTrigger.clear
        onUpdate.clear
        @pic.moveOpacity(15,0,0)
        pictureWait
        @index+=1 # Move to the next picture
        if @index>[email protected]
        openSplash(scene,args)
        else
        openPic(scene,args)
        end
        end

        #CHANGES HAVE BEEN MADE IN THIS DEF
        def openSplash(scene,args)
        onCTrigger.clear
        onUpdate.clear
        #Global variable for Animated Titlescreen
        @splash=0
        @pic.name=("Graphics/Pictures/splash_"[email protected])
        @pic.moveOpacity(15,0,255)
        @pic2.name="Graphics/Titles/start"
        @pic2.moveOpacity(15,0,255)
        pictureWait
        onUpdate.set(method(:splashUpdate)) # call splashUpdate every frame
        @splash+=1
        @splash=1 if @splash==96
        onCTrigger.set(method(:closeSplash)) # call closeSplash when C key is pressed
        end
        #END OF DEF. NO CHANGES FROM THIS POINT ON.

        def splashUpdate(scene,args)
        @timer+=1
        @timer=0 if @timer>=80
        if @timer>=32
        @pic2.moveOpacity(0,0,8*(@timer-32))
        else
        @pic2.moveOpacity(0,0,255-(8*@timer))
        end
        if Input.press?(Input::DOWN) &&
        Input.press?(Input::B) &&
        Input.press?(Input::CTRL)
        closeSplashDelete(scene,args)
        end
        end

        def closeSplash(scene,args)
        onCTrigger.clear
        onUpdate.clear
        @pic.moveOpacity(15,0,0)
        @pic2.moveOpacity(15,0,0)
        pictureWait
        pbBGMStop()
        scene.dispose # Close the scene
        sscene=PokemonLoadScene.new
        sscreen=PokemonLoad.new(sscene)
        sscreen.pbStartLoadScreen
        end

        def closeSplashDelete(scene,args)
        onCTrigger.clear
        onUpdate.clear
        @pic.moveOpacity(15,0,0)
        pictureWait
        pbBGMStop()
        scene.dispose # Close the scene
        sscene=PokemonLoadScene.new
        sscreen=PokemonLoad.new(sscene)
        sscreen.pbStartDeleteScreen
        end
        end



        class Scene_Intro
        def initialize(pics, splash = nil)
        @pics=pics
        @splash=splash
        end

        def main
        Graphics.transition(0)
        @eventscene=IntroEventScene.new(@pics,@splash)
        @eventscene.main
        Graphics.freeze
        end
        end

        I get this error after starting the game:
        Spoiler:

        Script "Scene_Intro" line 52 ( @pic.name=("Graphics/Pictures/splash_"[email protected]) ): TypeError occured. cannot convert Fixnum into String
        Reply With Quote
          #4    
        Old August 24th, 2012 (10:10 AM).
        venom12's Avatar
        venom12 venom12 is offline
        Pokemon Crystal Rain Relased
           
          Join Date: Sep 2006
          Age: 26
          Gender: Male
          Nature: Adamant
          Posts: 529
          I think it need to be
          @pic.name=("Graphics/Pictures/splash_"[email protected]+"")
          Reply With Quote
            #5    
          Old August 24th, 2012 (10:15 AM).
          Pharetra's Avatar
          Pharetra Pharetra is offline
          zzzz
             
            Join Date: Jun 2011
            Age: 21
            Gender: Male
            Posts: 455
            Quote:
            Originally Posted by venom12 View Post
            I think it need to be
            @pic.name=("Graphics/Pictures/splash_"[email protected]+"")
            I get the same error, I'm afraid this doesn't work.

            Thanks for your help though! (The same goes for zingzags.)
            Reply With Quote
              #6    
            Old August 24th, 2012 (11:09 AM).
            zingzags's Avatar
            zingzags zingzags is offline
            PokemonGDX creator
               
              Join Date: Jan 2009
              Location: Boston
              Age: 23
              Nature: Adamant
              Posts: 562
              The reason you are getting that error is because you are not suppose to call the image that way.
              __________________
              Check out the Pokemon Game Engine I am working on:
              https://github.com/sjosegarcia/Pokemon
              Reply With Quote
                #7    
              Old August 24th, 2012 (12:02 PM).
              Pharetra's Avatar
              Pharetra Pharetra is offline
              zzzz
                 
                Join Date: Jun 2011
                Age: 21
                Gender: Male
                Posts: 455
                Quote:
                Originally Posted by zingzags View Post
                The reason you are getting that error is because you are not suppose to call the image that way.
                Okay, how am I supposed to call it then?
                Reply With Quote
                  #8    
                Old August 26th, 2012 (11:48 AM).
                FL's Avatar
                FL FL is offline
                Pokémon Island Creator
                   
                  Join Date: Sep 2010
                  Gender: Male
                  Posts: 1,719
                  Try: @pic.name=("Graphics/Pictures/splash_"[email protected].to_s)
                  __________________
                  Reply With Quote
                    #9    
                  Old August 26th, 2012 (10:23 PM).
                  Pharetra's Avatar
                  Pharetra Pharetra is offline
                  zzzz
                     
                    Join Date: Jun 2011
                    Age: 21
                    Gender: Male
                    Posts: 455
                    Quote:
                    Originally Posted by FL . View Post
                    Try: @pic.name=("Graphics/Pictures/splash_"[email protected].to_s)
                    That fixes the problem with the error showing up, thanks! The pictures of the title screen don't show up, though.
                    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:51 PM.