• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

How to make a character selection screen

bleach12

ProjectM76Creator/AmateurCoder
6
Posts
13
Years
  • Just a question is it possible to have a selection screen and depending on which option is being selected have a different image appear on the screen? I want to have in my fan game when you select a character the character appear once their name is selected..

    I'm not too sure if this is in the right spot either. I'm a giant n00b. Sorry xD
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Absolutely, this is very possible. What I would do if I didn't know how to script (only saying this because you said you were a noob) would be through an event. You can show pictures and various other things if you look on the essentials website:(broken link removed)
    I warn you, if you wish to add more characters to choose from other than the standard boy, girl and brendan, you will need to make sprites of whoever on a bike, fishing etc. So it will take time. If you're willing to sprite them, I'll be willing to conference with you on how to do this.
     

    bleach12

    ProjectM76Creator/AmateurCoder
    6
    Posts
    13
    Years
  • Thank you so much, I'll look into it. Haha, I've already started spriting them. :p I hope this works out, if so do you want me to credit you for your help? Lol, yeah I am a bit of a noob sorry hah :p
     

    FL

    Pokémon Island Creator
    2,453
    Posts
    13
    Years
    • Seen May 10, 2024
    Use 'meta=pbGetMetadata(0,MetadataPlayerA+ID)' to get the player ID info (ID is the player ID number).'sprintf("Graphics/Characters/trainer%03d",meta[0])' gets the battler path.
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Thank you so much, I'll look into it. Haha, I've already started spriting them. :p I hope this works out, if so do you want me to credit you for your help? Lol, yeah I am a bit of a noob sorry hah :p

    Oh no, you don't need to credit me. I'm not giving any input from my own creativity, just simply what I've learned from many others. Okay well I have until August 7th to help you so just PM me when or if you need help
     

    PiaCRT

    Orange Dev
    939
    Posts
    13
    Years
  • Use 'meta=pbGetMetadata(0,MetadataPlayerA+ID)' to get the player ID info (ID is the player ID number).'sprintf("Graphics/Characters/trainer%03d",meta[0])' gets the battler path.

    You would call this over an option to display the character you are selecting, I presume? This would require scripting as well, since it's not a default RMXP feature. I believe there are examples of this in the editor, since when you scroll over options the graphics update themselves.
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • You would call this over an option to display the character you are selecting, I presume? This would require scripting as well, since it's not a default RMXP feature. I believe there are examples of this in the editor, since when you scroll over options the graphics update themselves.

    Scripting this would be simple if the thread starter knew how to script. I would think the most simple way would be through choices, conditional branches and displaying pictures with messages. Then just taking pbChangePlayer from the intro. At least for someone who doesn't know ruby.
     

    PiaCRT

    Orange Dev
    939
    Posts
    13
    Years
  • Scripting this would be simple if the thread starter knew how to script. I would think the most simple way would be through choices, conditional branches and displaying pictures with messages. Then just taking pbChangePlayer from the intro. At least for someone who doesn't know ruby.

    Yes, this is how you would go about it without scripting, it's just slightly clunky and repetitive if you have to press Enter or Z to view a character you selected, only to say "No, I dont want to be this chracter."
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Using indexes and if commands would be easiest.

    Here's some help.

    Code:
    @pick=1
    @yn=1
    @sprites["player"] = Sprite.new
    @sprites["player"].x =  # insert center cords
    @sprites["player"].y =  # insert center cords
    @sprites["player"].z = 99998
    
    @sprites["yes"] = Sprite.new
    @sprites["yes"].x =  # insert right center cords
    @sprites["yes"].y =  # insert right center cords
    @sprites["yes"].z = 99998
    
    @sprites["no"] = Sprite.new
    @sprites["no"].x =  # insert right center cords
    @sprites["no"].y =  # insert right center cords +50 on yes y cords
    @sprites["no"].z = 99998
    
    if Input.trigger?(Input::RIGHT)
          if @pick==1
          @sprites["player"].bitmap = BitmapCache.load_bitmap("Graphics/Picture/Char_"+@pick)
          @pick+=1
          if @pick==5
            @pick=1
          end
    
    if Input.trigger?(Input::LEFT)
          if @pick==1
          @sprites["player"].bitmap = BitmapCache.load_bitmap("Graphics/Picture/Char_"+@pick)
          @pick-=1
          if @pick==0
            @pick=4
          end
    
    if Input.trigger?(Input::DOWN)
          if @yn==1
          @sprites["yes"].bitmap = BitmapCache.load_bitmap("Graphics/Picture/yesH")
          @sprites["no"].bitmap = BitmapCache.load_bitmap("Graphics/Picture/no")
          @yn+=1
          if @yn==3
            @yn=1
          end
    
    if Input.trigger?(Input::UP)
          if @yn==1
          @sprites["yes"].bitmap = BitmapCache.load_bitmap("Graphics/Picture/yes")
          @sprites["no"].bitmap = BitmapCache.load_bitmap("Graphics/Picture/noH")
          @yn-=1
          if @yn==0
            @yn=2
          end
    
        if Input.trigger?(Input::B)
         @player=1
         @yn=1
        end
       
        if Input.trigger?(Input::C)
          Kernel.pbConfirmMessage(_INTL("Are you sure you want to be this skin?"))
        end

    Something like that... I just threw this together! But hopefully you can learn from it.
     

    PiaCRT

    Orange Dev
    939
    Posts
    13
    Years
  • Nice example Nickaloose, I actually found this interesting and started looking at how the Edit Trainer Battles from the editor worked it out. I'm gonna mess with it and see if I can use it to make a character selection screen.

    Spoiler:
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Glad I could be of help, will check what you manage to come up with or if you come up with anything at all, good luck
     
    Back
    Top