• 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.

Box to input text

38
Posts
8
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
     
    824
    Posts
    8
    Years
  • untitled_by_rot8erconex-daggb7p.png


    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.
     
    38
    Posts
    8
    Years
    • Seen Nov 26, 2023
    untitled_by_rot8erconex-daggb7p.png


    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
     
    824
    Posts
    8
    Years
  • 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.
     
    38
    Posts
    8
    Years
    • Seen Nov 26, 2023
    I can store more than 1 value in the same variable? to make lots of different codes?
     
    Back
    Top