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.

Reply
 
Thread Tools
  #1    
Old December 15th, 2013 (10:42 PM).
Joltik's Avatar
Joltik Joltik is offline
     
    Join Date: Jan 2010
    Gender: Male
    Nature: Modest
    Posts: 116

    Hi everyone,

    I have been searching the scripts for the code that defines that the surfing and the diving character sprites will only use 2 frames. I want to change it to use the entire row (4 frames) instead.
    Does anyone knows where can I find it? Any subtlety I should notice related to the auto-update of the graphics?

    Thank you very much!

    Reply With Quote

    Relevant Advertising!

      #2    
    Old December 16th, 2013 (3:29 AM).
    Maruno's Avatar
    Maruno Maruno is offline
    Lead Dev of Pokémon Essentials
       
      Join Date: Jan 2008
      Location: England
      Posts: 5,173

      What do the surfing sprites do in water? They bob. Have a search for that word.

      __________________

      Go to the Pokémon Essentials Wiki

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

      Follow me on Twitter: @maruno42

      Reply With Quote
        #3    
      Old December 17th, 2013 (10:59 AM).
      Joltik's Avatar
      Joltik Joltik is offline
         
        Join Date: Jan 2010
        Gender: Male
        Nature: Modest
        Posts: 116

        Well I did find it in Sprite_Character, I played around with the script, but I didn't really understand it.

        Code:
                bob=((Graphics.frame_count%60)<30) ? 0 : 1
                self.oy=(bob>0) ? @ch-16-2 : @ch-16
        Changing the (Graphics.frame_count%60)<30 obviously changed the speed in which the animation changes.
        Changing the ? 0 : 1 changed which parts of the sprite are used (like 0 : 3 oscilates between frame 0 and frame 3.
        However, I don't know how to modify it, so to change from 0 to 1, then from one to 2 and so on.
        I know it should be something simple, like a slight modification in the 0 : 1 part, but my attempts failed.
        Any help on that would be really appreciated.
        Thank you!

        Reply With Quote
          #4    
        Old December 17th, 2013 (11:24 AM).
        Maruno's Avatar
        Maruno Maruno is offline
        Lead Dev of Pokémon Essentials
           
          Join Date: Jan 2008
          Location: England
          Posts: 5,173

          Code:
          bob=((Graphics.frame_count%60)<30) ? 0 : 1
          This line gives you two possible values for bob: 0 or 1. The value of bob is used to decide which frame of the charset is used. You want bob to have 4 possible values (0-3), sequentially and evenly-spaced.

          Code:
          bob=((Graphics.frame_count%60)/15).floor
          That's a possibility. You'll then need to make sure that the lines that use bob make sense, given how bob now works (i.e. it has 4 possible values rather than 2). The self.oy= line will need to be tweaked in some way.

          __________________

          Go to the Pokémon Essentials Wiki

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

          Follow me on Twitter: @maruno42

          Reply With Quote
            #5    
          Old December 18th, 2013 (3:11 PM).
          Joltik's Avatar
          Joltik Joltik is offline
             
            Join Date: Jan 2010
            Gender: Male
            Nature: Modest
            Posts: 116

            Thank you very much!
            In case anyone wants to do the same, follow Maruno's tip and change the self.oy line to

            Code:
                    case bob
                    when 0
                      [email protected]
                    when 1
                      [email protected]
                    when 2
                      [email protected]
                    when 3
                      [email protected]
                    else
                      [email protected]
                    end

            Maybe there's an easier way, but that one works.

            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 4:44 AM.