Scripts & Tutorials 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.

Reply
 
Thread Tools
  #1    
Old April 29th, 2013 (5:32 PM). Edited April 29th, 2013 by Rayd12smitty.
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
     
    Join Date: Dec 2011
    Gender: Male
    Posts: 647

    Hey guys. So Thanks to thor348 I figured out how to do something that has been bugging a LOT of people. How to Animate the Title Screen! I've seen many posts asking how you can use a .gif or multiple frames in a loop as a title screen instead of a static image. I found out how (It was actually really simple XD) Anyway here we go.

    Tutorial by Rayd12smitty using Pokemon Essentials Version 11

    The Images
    First, you need your new title screen. No .gif images here! You need all your images as frames, one for each frame in the game (Unless you want to mess around with the timer) There are 20 frames in one second, so you may have a LOT of images. Thats alright though. Name your images
    Splash_1, Splash_2, Splash_3, etc. Put them in a folder Called Splash inside your game folder in Graphics/Titles. I recommend over 100 frames, even if they are just duplicates. I have 40 different frames, but 3 or 4 of each one in a row so it doesn't move so fast. This brings the total to 120 or 160 depending on how fast I want it. It takes a while to name all the images but it needs to be done.

    The Script
    Alright. The script we are dealing with is Scene_Intro. This is the scene that loads the start screen (The black screen with Pokemon Essentials creators on it) and the Title screen. Open the script and go to line 50. It should say

    Code:
    @pic.name="Graphics/Titles/"[email protected]

    Directly ABOVE it, add the line

    Code:
    @Animation = 1
    This sets the title screen's frame to 1.

    Then REPLACE the line that is now line 51 which says

    Code:
    @pic.name="Graphics/Titles/"[email protected]
    with
    Code:
    @pic.name="[email protected]}"
    This will change where the images are found and makes it so the images name depends on the variable we created (@Animation)

    Halfway done. Now find the line that says

    Code:
    @timer=0 if @timer>=80
    it should be around line 62. AFTER this line add
    Code:
    @Animation+=1 if @Animation<ZZZ
        @Animation = 1 if @Animation==ZZZ
        @pic.name="[email protected]}"
    This adds 1 to the variable @Animation every frame and once it reaches a certain number resets it to 1. It also updates what image is being shown depending on the variable @Animation.

    Replace ZZZ with how many frames your title screen has. If you have 160 images in the folder Graphics/Title/Splash, this number is 160. If you have 40 frames, this number is 40. Simple right?

    Thats should do it :D Now your title screen acts animated, not static. Below I will explain one more little change to the title screen to help your game.

    The Cry
    If you've played your game or any other Pokemon Essentials game, you know that a random pokemon's cry is played when the "Enter" button is pressed. But your game might be about Rayquaza, you don't want a random Wynaut screaming when the player hits start! This is a real simple fix. Once again in the script Scene_Intro search for

    Code:
    cry=sprintf("%03dCry",1+rand(PBSpecies.maxValue))
        pbSEPlay(cry,100,100)
    and replace it with
    Code:
    pbSEPlay('ZZZCry',100,100)
    where ZZZ is the national dex number of the pokemon who's cry you want played.
    There are 2 places in the script where these lines are found. Do this to both

    Please Read
    Thats all. Thanks for reading through this and I hope you found it helpful. If you use the animated title screen edits, please give me credit Rayd12smitty. I don't require credit for the cry played. Please comment with any questions/errors (Although there shouldn't be errors if you followed the directions right)

    Example (Mine don't use)

    __________________

    Reply With Quote

    Relevant Advertising!

      #2    
    Old April 29th, 2013 (5:40 PM).
    ppooookkkkkkk ppooookkkkkkk is offline
    Banned
       
      Join Date: May 2012
      Location: Newbud town (Pokemon Morning/Night)
      Age: 16
      Gender: Male
      Nature: Gentle
      Posts: 229

      I love all your tutorials (as well as carmaniacs).
      This tutorial hopefully will make my game more attractive thank you.

      Reply With Quote
        #3    
      Old April 29th, 2013 (5:59 PM).
      Rayd12smitty's Avatar
      Rayd12smitty Rayd12smitty is offline
      Shadow Maker
         
        Join Date: Dec 2011
        Gender: Male
        Posts: 647

        Quote:
        Originally Posted by ppooookkkkkkk View Post
        I love all your tutorials (as well as carmaniacs).
        This tutorial hopefully will make my game more attractive thank you.

        I've only made 2 or 3 XD Thanks so much though it means a lot. Carmaniac actually taught me just about every thing I know about scripting.

        __________________

        Reply With Quote
          #4    
        Old April 29th, 2013 (9:41 PM).
        KingCharizard's Avatar
        KingCharizard KingCharizard is offline
        C++ Developer Extraordinaire
           
          Join Date: Dec 2009
          Location: Pennsylvania
          Age: 29
          Gender: Male
          Nature: Bold
          Posts: 1,250

          Quote:
          Originally Posted by Rayd12smitty View Post
          I've only made 2 or 3 XD Thanks so much though it means a lot. Carmaniac actually taught me just about every thing I know about scripting.

          Thats interesting, I remember when carmaniac wasnt that good with scripting himself but nice tut, I do think it would be easier to just use .gif but this way works too

          __________________

          Reply With Quote
            #5    
          Old April 30th, 2013 (3:42 AM).
          Rayd12smitty's Avatar
          Rayd12smitty Rayd12smitty is offline
          Shadow Maker
             
            Join Date: Dec 2011
            Gender: Male
            Posts: 647

            Quote:
            Originally Posted by KingCharizard View Post
            Thats interesting, I remember when carmaniac wasnt that good with scripting himself but nice tut, I do think it would be easier to just use .gif but this way works too

            .gifs don't work. That's why I made this. When you try using a .gif for a splash screen it just shows the first frame and never animates.

            __________________

            Reply With Quote
              #6    
            Old April 30th, 2013 (5:19 AM).
            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,103

              Quote:
              Originally Posted by Rayd12smitty View Post
              .gifs don't work. That's why I made this. When you try using a .gif for a splash screen it just shows the first frame and never animates.

              GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...

              Quote:
              Originally Posted by KingCharizard View Post
              Thats interesting, I remember when carmaniac wasnt that good with scripting himself

              Ryan has come a long way in a small period of time. He was really dedicated to improving his skills, both in coding and spriting.

              __________________


              Reply With Quote
                #7    
              Old April 30th, 2013 (7:57 AM).
              KingCharizard's Avatar
              KingCharizard KingCharizard is offline
              C++ Developer Extraordinaire
                 
                Join Date: Dec 2009
                Location: Pennsylvania
                Age: 29
                Gender: Male
                Nature: Bold
                Posts: 1,250

                Quote:
                Originally Posted by Luka S.J. View Post
                GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...

                Ryan has come a long way in a small period of time. He was really dedicated to improving his skills, both in coding and spriting.

                Yea Luka is right, if you modify the code like you did with the above method you could easily use .gifs

                Oh, snap first name basis.. it just got serious.. Yea i know I've been seeing his posts havent talked to him lately since they got rid of MSN

                __________________

                Reply With Quote
                  #8    
                Old April 30th, 2013 (9:05 AM).
                thor348's Avatar
                thor348 thor348 is offline
                That's Oak to You
                   
                  Join Date: Nov 2012
                  Location: Arizona
                  Gender: Male
                  Nature: Calm
                  Posts: 136

                  Quote:
                  Originally Posted by Luka S.J. View Post
                  GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...

                  Ahh yes. That does work. Very sorry Rayd12smitty for providing a more difficult way to do it

                  Reply With Quote
                    #9    
                  Old April 30th, 2013 (3:52 PM). Edited April 30th, 2013 by Rayd12smitty.
                  Rayd12smitty's Avatar
                  Rayd12smitty Rayd12smitty is offline
                  Shadow Maker
                     
                    Join Date: Dec 2011
                    Gender: Male
                    Posts: 647

                    I kind of meant gifs wouldn't work without script edits. Either way it's working and some people may prefer this method.

                    __________________

                    Reply With Quote
                      #10    
                    Old April 30th, 2013 (7:01 PM).
                    KingCharizard's Avatar
                    KingCharizard KingCharizard is offline
                    C++ Developer Extraordinaire
                       
                      Join Date: Dec 2009
                      Location: Pennsylvania
                      Age: 29
                      Gender: Male
                      Nature: Bold
                      Posts: 1,250

                      Quote:
                      Originally Posted by Rayd12smitty View Post
                      I kind of meant gifs wouldn't work without script edits. Either way it's working and some people may prefer this method.

                      isnt your way editing a script as well? There is nothing against your method it just is gonna take a little bit more work than the .gif method. but your right some people may prefer this way opposed to the other way. to each their own...

                      anyways nice tutorial overall, very clear and precise with the instructions.. I like your style, looking forward to seeing more from you.

                      __________________

                      Reply With Quote
                        #11    
                      Old May 1st, 2013 (1:44 AM).
                      Pharetra's Avatar
                      Pharetra Pharetra is offline
                      zzzz
                         
                        Join Date: Jun 2011
                        Age: 21
                        Gender: Male
                        Posts: 455

                        Quote:
                        Originally Posted by thor348 View Post
                        Ahh yes. That does work. Very sorry Rayd12smitty for providing a more difficult way to do it
                        Don't worry, your way has it's own advantages. You won't be restricted to 252 colours for example, which is something I really like ;)

                        Thanks for the tutorial :)

                        Reply With Quote
                          #12    
                        Old May 2nd, 2013 (4:26 AM).
                        Peeky Chew's Avatar
                        Peeky Chew Peeky Chew is offline

                        Master of Palettes

                        • Crystal Tier
                         
                        Join Date: Sep 2009
                        Location: Great Britain
                        Age: 23
                        Gender: Male
                        Posts: 852

                        Can someone please explain what exactly you have to change about smitty's script to make it work with .GIFs?

                        __________________




                        Demo Beta out Now!

                        Reply With Quote
                          #13    
                        Old May 7th, 2013 (7:38 AM).
                        tylerab01's Avatar
                        tylerab01 tylerab01 is offline
                        Pokemon AquaHarmony
                           
                          Join Date: Apr 2009
                          Location: France
                          Gender: Male
                          Nature: Bold
                          Posts: 165

                          Quote:
                          Originally Posted by Peeky Chew View Post
                          Can someone please explain what exactly you have to change about smitty's script to make it work with .GIFs?

                          I believe this will work, but Luka knows better than I.

                          @viewport=Viewport.new(0,0,GRAPHICSHEIGHT,GRAPHICSWIDTH)
                          @sprites["Pic"]=GifSprite.new (@viewport)
                          @sprites["Pic"].bitmap=BitmapCache.load_bitmap("PATH TO PICTURE")

                          I set my own viewports so you will have to check the Settings Script of Essentials.

                          -AvD

                          __________________


                          Reply With Quote
                            #14    
                          Old December 2nd, 2013 (10:24 PM).
                          CrazyClyde's Avatar
                          CrazyClyde CrazyClyde is offline
                             
                            Join Date: Oct 2013
                            Location: Bay Area, California
                            Gender: Male
                            Nature: Jolly
                            Posts: 1

                            For some reason, when I did all the scripts for the cry at the end. an error came up, and it said, "Script 'Scene_Intro' line 111: SyntaxError occured,". Any idea? I didn't even mess with that line..

                            Reply With Quote
                              #15    
                            Old December 3rd, 2013 (7:04 PM).
                            WinterKirby's Avatar
                            WinterKirby WinterKirby is offline
                               
                              Join Date: Dec 2012
                              Age: 5
                              Gender: Male
                              Nature: Mild
                              Posts: 152

                              Quote:
                              Originally Posted by CrazyClyde View Post
                              For some reason, when I did all the scripts for the cry at the end. an error came up, and it said, "Script 'Scene_Intro' line 111: SyntaxError occured,". Any idea? I didn't even mess with that line..

                              What do you have on line 111?

                              __________________

                              X/Y Friend Code: 1349-5852-1728 | Pinkie | Flying | Hoot-Hoot, Pidgey, and Tropius

                              Reply With Quote
                                #16    
                              Old February 8th, 2015 (7:33 AM).
                              ultrademise ultrademise is offline
                                 
                                Join Date: Jun 2014
                                Posts: 3

                                when i try to test this, i get the following error:
                                Script 'Scene_Intro' line 58: SyntaxError occured
                                please help me

                                This is my script

                                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

                                def openSplash(scene,args)
                                onCTrigger.clear
                                onUpdate.clear
                                @Animation = 1
                                @pic.name="[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
                                onCTrigger.set(method(:closeSplash)) # call closeSplash when C key is pressed
                                end

                                def splashUpdate(scene,args)
                                @timer+=1
                                @timer=0 if @timer>=80
                                @Animation+=1 if @Animation<1
                                @Animation = 1 if @Animation==1
                                @pic.name="[email protected]
                                if @timer>=32
                                @pic2.moveOpacity(0,0,8*(@timer-32))
                                else
                                @pic2.moveOpacity(0,0,255-([email protected]))
                                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
                                # Play random cry
                                pbSEPlay('384Cry',100,100)
                                # Fade out
                                @pic.moveOpacity(15,0,0)
                                @pic2.moveOpacity(15,0,0)
                                pbBGMStop(1.0)
                                pictureWait
                                scene.dispose # Close the scene
                                sscene=PokemonLoadScene.new
                                sscreen=PokemonLoad.new(sscene)
                                sscreen.pbStartLoadScreen
                                end

                                def closeSplashDelete(scene,args)
                                onCTrigger.clear
                                onUpdate.clear
                                # Play random cry
                                pbSEPlay('384Cry',100,100)
                                # Fade out
                                @pic.moveOpacity(15,0,0)
                                @pic2.moveOpacity(15,0,0)
                                pbBGMStop(1.0)
                                pictureWait
                                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

                                Reply With Quote
                                  #17    
                                Old December 2nd, 2015 (10:55 PM). Edited December 3rd, 2015 by Maruno.
                                Furankku's Avatar
                                Furankku Furankku is offline
                                The True Befriender of Pokémon
                                   
                                  Join Date: Dec 2009
                                  Location: Rialto, California
                                  Age: 32
                                  Gender: Male
                                  Nature: Calm
                                  Posts: 3

                                  Quote:
                                  Originally Posted by ultrademise View Post
                                  when i try to test this, i get the following error:
                                  Script 'Scene_Intro' line 58: SyntaxError occured
                                  please help me

                                  I get the exact same error, has a solution been found?
                                  My script if it helps:

                                  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

                                  def openSplash(scene,args)
                                  onCTrigger.clear
                                  onUpdate.clear
                                  @Animation = 1
                                  @pic.name="[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
                                  onCTrigger.set(method(:closeSplash)) # call closeSplash when C key is pressed
                                  end

                                  def splashUpdate(scene,args)
                                  @timer+=1
                                  @timer=0 if @timer>=80
                                  @Animation+=1 if @Animation<120
                                  @Animation = 1 if @Animation==120
                                  @pic.name="[email protected]
                                  if @timer>=32
                                  @pic2.moveOpacity(0,0,8*(@timer-32))
                                  else
                                  @pic2.moveOpacity(0,0,255-([email protected]))
                                  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
                                  # Play random cry
                                  cry=pbResolveAudioSE(pbCryFile(1+rand(PBSpecies.maxValue)))
                                  pbSEPlay(cry,100,100) if cry
                                  # Fade out
                                  @pic.moveOpacity(15,0,0)
                                  @pic2.moveOpacity(15,0,0)
                                  pbBGMStop(1.0)
                                  pictureWait
                                  scene.dispose # Close the scene
                                  sscene=PokemonLoadScene.new
                                  sscreen=PokemonLoad.new(sscene)
                                  sscreen.pbStartLoadScreen
                                  end

                                  def closeSplashDelete(scene,args)
                                  onCTrigger.clear
                                  onUpdate.clear
                                  # Play random cry
                                  cry=pbResolveAudioSE(pbCryFile(1+rand(PBSpecies.maxValue)))
                                  pbSEPlay(cry,100,100) if cry
                                  # Fade out
                                  @pic.moveOpacity(15,0,0)
                                  @pic2.moveOpacity(15,0,0)
                                  pbBGMStop(1.0)
                                  pictureWait
                                  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

                                  The solution to mine and ultrademise's problem was pointed out to me by the maker of another Pokemon Essentials game, it was simply that the tutorial doesn't have us close the

                                  Quote:
                                  @pic.name="[email protected]
                                  it should be
                                  Quote:
                                  @pic.name="[email protected]}"

                                  Reply With Quote
                                    #18    
                                  Old December 3rd, 2015 (11:04 AM).
                                  mej71's Avatar
                                  mej71 mej71 is offline
                                  • Moderator
                                   
                                  Join Date: Mar 2014
                                  Location: Omnipresence
                                  Gender: Male
                                  Posts: 1,205

                                  Quote:
                                  Originally Posted by Furankku View Post
                                  I get the exact same error, has a solution been found?
                                  My script if it helps:
                                  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

                                  def openSplash(scene,args)
                                  onCTrigger.clear
                                  onUpdate.clear
                                  @Animation = 1
                                  @pic.name="[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
                                  onCTrigger.set(method(:closeSplash)) # call closeSplash when C key is pressed
                                  end

                                  def splashUpdate(scene,args)
                                  @timer+=1
                                  @timer=0 if @timer>=80
                                  @Animation+=1 if @Animation<120
                                  @Animation = 1 if @Animation==120
                                  @pic.name="[email protected]
                                  if @timer>=32
                                  @pic2.moveOpacity(0,0,8*(@timer-32))
                                  else
                                  @pic2.moveOpacity(0,0,255-([email protected]))
                                  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
                                  # Play random cry
                                  cry=pbResolveAudioSE(pbCryFile(1+rand(PBSpecies.maxValue)))
                                  pbSEPlay(cry,100,100) if cry
                                  # Fade out
                                  @pic.moveOpacity(15,0,0)
                                  @pic2.moveOpacity(15,0,0)
                                  pbBGMStop(1.0)
                                  pictureWait
                                  scene.dispose # Close the scene
                                  sscene=PokemonLoadScene.new
                                  sscreen=PokemonLoad.new(sscene)
                                  sscreen.pbStartLoadScreen
                                  end

                                  def closeSplashDelete(scene,args)
                                  onCTrigger.clear
                                  onUpdate.clear
                                  # Play random cry
                                  cry=pbResolveAudioSE(pbCryFile(1+rand(PBSpecies.maxValue)))
                                  pbSEPlay(cry,100,100) if cry
                                  # Fade out
                                  @pic.moveOpacity(15,0,0)
                                  @pic2.moveOpacity(15,0,0)
                                  pbBGMStop(1.0)
                                  pictureWait
                                  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

                                  The solution to mine and ultrademise's problem was pointed out to me by the maker of another Pokemon Essentials game, it was simply that the tutorial doesn't have us close the
                                  it should be

                                  Generally, syntax errors are because you need to use Thread Tools -> Show Printable Version

                                  Pokecommunity's formatting breaks some coding

                                  Reply With Quote
                                    #19    
                                  Old January 19th, 2016 (2:39 PM).
                                  Reni Reni is offline
                                  TheLoneReni
                                     
                                    Join Date: Jan 2016
                                    Location: Arizona
                                    Gender: Female
                                    Nature: Bashful
                                    Posts: 1

                                    I dunno if any one else is having this issue but I was following this tutorial and when I went in to play it, the game gave me the error, "Script 'Main' line 21: NameError occured. Uninitialized constant Scene_Intro."

                                    This was the first time I was messing around with the script and I only changed and added exactly what was stated so I'm not sure what to do. I don't know a whole lot of coding either so I'm not certain what the issue is or how to fix it.

                                    Reply With Quote
                                    Reply
                                    Quick Reply

                                    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:32 AM.