• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

Box to input text

  • 38
    Posts
    9
    Years
    • Seen Nov 26, 2023
    Hi Pokemon Makers!
    Well, i would like to know if theres a way to create a box to player input a text and the script/npc will recognize this.

    Ex: I made an preset code for npc: 10. So the player will talk to npc and he'll request to player input this code. If player type 10, then NPC return a message/menu that shows its correct. If player type anything as not 10, then NPC return a message showing he input the incorrect number and close conversation or just give to he a 'try again'.

    Dont know if I explain that well, cause english is not my main language, but, i hope you guys can help me =D
     
    [PokeCommunity.com] Box to input text


    pbSet(12,stuff) will set the twelfth game variable to equal stuff.

    pbEnterText("Bob",1,10) will bring up a text box for the player to enter text into. The question at the top of the text box will read "Bob", and the text the player can enter must be between 1 and 10 characters long.

    You then use a conditional branch to check if the twelfth game variable reads what you want it to read.
     
    [PokeCommunity.com] Box to input text


    pbSet(12,stuff) will set the twelfth game variable to equal stuff.

    pbEnterText("Bob",1,10) will bring up a text box for the player to enter text into. The question at the top of the text box will read "Bob", and the text the player can enter must be between 1 and 10 characters long.

    You then use a conditional branch to check if the twelfth game variable reads what you want it to read.

    It worked! Thank you a lot! So, maybe you can make an advanced example for me? I'm just want compare with your script to see if im doing it right
     
    That is an advanced example. Put whatever you want to happen if the player gets the password right, under the Conditional Branch command but above the Else that comes with it. Put whatever you want to happen if they get it wrong between the Else and the End.
     
    I can store more than 1 value in the same variable? to make lots of different codes?
     
    Back
    Top